epsilon(x): Epsilon

Função Epsilon.

Declaration

Sintaxe

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

Argumentos

x the input value must be of type real.

Valores de retorno

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

Descrição

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

Exemplos

program intrinsics_epsilon
	print *, epsilon(3.143)
end program

Resultado:

1.19209290E-07

Veja Também