Debian Codegraph @

doc/src/intrinsics/numeric/epsilon.md

raw
1 # epsilon(x): Epsilon
2
3 Epsilon function.
4
5 ## Declaration
6
7 ### Syntax
8
9 ```fortran
10 retval = epsilon(x)
11 elemental real function epsilon(x)
12 ```
13
14 ### Arguments
15
16 `x` the input value must be of type real.
17
18 ### Return values
19
20 The return value is of same type as of the input argument.
21
22 ## Description
23
24 **epsilon(x)** computes the smallest number $\epsilon$ of the same kind as `x`
25 following:
26
27 $1 + \epsilon > 1$
28
29 ## Types
30
31 Supported argument types is real.
32
33 ```fortran
34 interface epsilon
35 module procedure sepsilon, depsilon
36 end interface
37
38 contains
39
40 elemental real(sp) function sepsilon(x)
41 real(sp), intent(in) :: x
42 end function
43
44 elemental real(dp) function depsilon(x)
45 real(dp), intent(in) :: x
46 end function
47 ```
48
49 ## Examples
50
51 ```fortran
52 program intrinsics_epsilon
53 print *, epsilon(3.143)
54 end program
55 ```
56
57 **Result:**
58
59 ```
60 1.19209290E-07
61 ```
62
63 ## See Also