efp_real_diff Function

public 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.

Arguments

Type IntentOptional Attributes Name
type(efp_t), intent(in) :: a
type(efp_t), intent(in) :: b

Return Value real(kind=real64)


Calls

proc~~efp_real_diff~~CallsGraph proc~efp_real_diff efp_real_diff proc~efp_minus efp_minus proc~efp_real_diff->proc~efp_minus proc~efp_to_real efp_to_real proc~efp_real_diff->proc~efp_to_real proc~efp_regularize efp_regularize proc~efp_minus->proc~efp_regularize proc~efp_to_real->proc~efp_regularize proc~efp_carry efp_carry proc~efp_regularize->proc~efp_carry

Called by

proc~~efp_real_diff~~CalledByGraph proc~efp_real_diff efp_real_diff proc~console_stats_report console_stats_report proc~console_stats_report->proc~efp_real_diff proc~ocean_console_stats_report ocean_console_stats_report proc~ocean_console_stats_report->proc~console_stats_report proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~ocean_console_stats_report proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Source Code

   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