real64 = efp_to_real(efp_minus(a, b)) – the difference of two
~1e21-scale EFP totals resolved to the EFP quantum (2**-3P), NOT
to ulp(1e21) as a double subtraction would give. This is the
fix documented in the plan’s SS2.2: an implementer who converts
both operands to real64 FIRST and subtracts loses the whole
benefit of this module.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(efp_t), | intent(in) | :: | a | |||
| type(efp_t), | intent(in) | :: | b |
pure function efp_real_diff(a, b) result(r) !! `real64 = efp_to_real(efp_minus(a, b))` -- the difference of two !! ~1e21-scale EFP totals resolved to the EFP quantum (`2**-3P`), NOT !! to `ulp(1e21)` as a double subtraction would give. This is the !! fix documented in the plan's SS2.2: an implementer who converts !! both operands to `real64` FIRST and subtracts loses the whole !! benefit of this module. type(efp_t), intent(in) :: a, b real(real64) :: r r = efp_to_real(efp_minus(a, b)) end function efp_real_diff