epsilon(x): Epsilon

Epsilon function.

Declaración

Sintaxis

retval = epsilon(x)
elemental real function epsilon(x)

Argumentos

x the input value must be of type real.

Valores devueltos

The return value is of same type as of the input argument.

Descripción

epsilon(x) computes the smallest number \(\epsilon\) of the same kind as x following:

\(1 + \epsilon > 1\)

Tipos

Supported argument types is real.

interface epsilon
    module procedure sepsilon, depsilon
end interface

contains

elemental real(sp) function sepsilon(x)
real(sp), intent(in) :: x
end function

elemental real(dp) function depsilon(x)
real(dp), intent(in) :: x
end function

Ejemplos

program intrinsics_epsilon
	print *, epsilon(3.143)
end program

Result:

1.19209290E-07

Ver también