erf(3f) - [FORTRAN:INTRINSIC:MATHEMATICS] Error function
Description
Syntax
Arguments
Return Value
Example
Standard
Class
erf(x) computes the error function of X, defined as $$ \text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0**x e**{-t**2} dt. $$
result = erf(x)
X - The type shall be REAL.
The return value is of type REAL, of the same kind as X and lies in the range -1 <= erf(x) <= 1 .
Sample program:
program demo_erf real(8) :: x = 0.17_8 x = erf(x) end program demo_erf
[[Fortran 2008]] and later
[[Elemental procedure|Elemental function]]
erf (3) | March 18, 2019 |