Namespaces
Variants
Views
Actions

Numerics

From cppreference.com
< c
Revision as of 10:35, 1 February 2017 by 196.217.66.247 (Talk)

The C numerics library includes common mathematical functions and types, as well as optimized numeric arrays and support for random number generation.

Contents

Mathematical functions

The header math.h provides standard C library mathematical functions such as fabs, sqrt, and sin.

Floating-point environment

The header fenv.h defines flags and functions related to exceptional floating-point state, such as overflow and division by zero.

Pseudo-random number generation

The header stdlib.h also includes C-style random number generation via srand and rand.

Complex number arithmetic

The header complex.h povides types and functions about complex numbers.

Type-generic math

The header tgmath.h provides standare C library type-generic mathematical functions by adding f for float, none for double, l for long double or c for complex.

See also

C++ documentation for Numerics library