Dekker's exact product: exactly (barring overflow), without FMA.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | a | |||
| real(kind=dp), | intent(in) | :: | b | |||
| real(kind=dp), | intent(out) | :: | p | |||
| real(kind=dp), | intent(out) | :: | e |
pure subroutine two_prod(a, b, p, e) real(dp),intent(in) :: a, b real(dp),intent(out) :: p, e real(dp) :: ah, al, bh, bl p = a * b call split(a, ah, al) call split(b, bh, bl) e = ((ah*bh - p) + ah*bl + al*bh) + al*bl end subroutine two_prod