std::erf
From cppreference.com
| Defined in header <cmath>
|
||
| float erf( float arg ); |
(1) | (since C++11) |
| double erf( double arg ); |
(2) | (since C++11) |
| long double erf( long double arg ); |
(3) | (since C++11) |
| double erf( Integral arg ); |
(4) | (since C++11) |
4) A set of overloads or a function template accepting an argument of any integral type. Equivalent to 2) (the argument is cast to double).
Parameters
| arg | - | value of a floating-point or Integral type |
Return value
If no errors occur, value of the error function ofarg, that is | 2 |
| √π |
0e-t2
dt, is returned.
| 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 |