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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(efp_t), | intent(in) | :: | a | |||
| type(efp_t), | intent(in) | :: | b |
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