efp_minus Function

public pure function efp_minus(a, b) result(c)

Exact bin-wise integer subtraction, regularised. See efp_plus for why regularisation (not mere carry) is required for bit-for-bit order invariance, and for the poison propagation (additive here too – subtraction of a poisoned operand is still poisoned, never “cancels” back to clean).

Arguments

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

Return Value type(efp_t)


Calls

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

Called by

proc~~efp_minus~~CalledByGraph proc~efp_minus efp_minus proc~efp_real_diff efp_real_diff proc~efp_real_diff->proc~efp_minus 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_minus(a, b) result(c)
      !! Exact bin-wise integer subtraction, regularised.  See `efp_plus`
      !! for why regularisation (not mere carry) is required for
      !! bit-for-bit order invariance, and for the `poison` propagation
      !! (additive here too -- subtraction of a poisoned operand is still
      !! poisoned, never "cancels" back to clean).
      type(efp_t), intent(in) :: a, b
      type(efp_t) :: c
      c%v = a%v - b%v
      call efp_regularize(c%v)
      c%poison = a%poison + b%poison
   end function efp_minus