W3cubDocs

/GNU Fortran 7

9.94 EPSILON — Epsilon function

Description:

EPSILON(X) returns the smallest number E of the same kind as X such that 1 + E > 1.

Standard:

Fortran 95 and later

Class:

Inquiry function

Syntax:

RESULT = EPSILON(X)

Arguments:
X The type shall be REAL.
Return value:

The return value is of same type as the argument.

Example:
program test_epsilon
    real :: x = 3.143
    real(8) :: y = 2.33
    print *, EPSILON(x)
    print *, EPSILON(y)
end program test_epsilon

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gfortran/EPSILON.html