| 954 | /******************************************************************************/ |
| 955 | |
| 956 | double r8_epsilon ( ) |
| 957 | |
| 958 | /******************************************************************************/ |
| 959 | /* |
| 960 | Purpose: |
| 961 | |
| 962 | R8_EPSILON returns the R8 round off unit. |
| 963 | |
| 964 | Discussion: |
| 965 | |
| 966 | R8_EPSILON is a number R which is a power of 2 with the property that, |
| 967 | to the precision of the computer's arithmetic, |
| 968 | 1 < 1 + R |
| 969 | but |
| 970 | 1 = ( 1 + R / 2 ) |
| 971 | |
| 972 | Licensing: |
| 973 | |
| 974 | This code is distributed under the GNU LGPL license. |
| 975 | |
| 976 | Modified: |
| 977 | |
| 978 | 01 September 2012 |
| 979 | |
| 980 | Author: |
| 981 | |
| 982 | John Burkardt |
| 983 | |
| 984 | Parameters: |
| 985 | |
| 986 | Output, double R8_EPSILON, the R8 round-off unit. |
| 987 | */ |
| 988 | { |
| 989 | const double value = 2.220446049250313E-016; |
| 990 | |
| 991 | return value; |
| 992 | } |
| 993 | /******************************************************************************/ |
| 994 | |
| 995 | double r8_max ( double x, double y ) |