erf, erff, erfl
From cppreference.com
| Defined in header <math.h>
|
||
| float erff( float arg ); |
(1) | (since C99) |
| double erf( double arg ); |
(2) | (since C99) |
| long double erfl( long double arg ); |
(3) | (since C99) |
| Defined in header <tgmath.h>
|
||
| #define erf( arg ) |
(4) | (since C99) |
4) Type-generic macro: If
arg has type long double, erfl is called. Otherwise, if arg has integer type or the type double, erf is called. Otherwise, erff is called.Parameters
| arg | - | floating point value |
Return value
If no errors occur, value of the error function ofarg, that is | 2 |
| √π |
0e-t2
dt, is returned. If a range error occurs due to underflow, the correct result (after rounding), that is
| 2*arg |
| √π |
Error handling
Errors are reported as specified in math_errhandling.
If the implementation supports IEEE floating-point arithmetic (IEC 60559),
- If the argument is ±0, ±0 is returned
- If the argument is ±∞, ±1 is returned
- If the argument is NaN, NaN is returned
Notes
Underflow is guaranteed if |arg| < DBL_MIN*(sqrt(π)/2).
erf(| x |
| σ√2 |