3 ! MOD/MODULO sign of zero.
5 ! We wish to provide the following guarantees:
7 ! MOD(A, P): The result has the sign of A and a magnitude less than
10 ! MODULO(A, P): The result has the sign of P and a magnitude less than
13 ! Here we test only with constant arguments (evaluated with
14 ! mpfr_fmod), as we don't want to cause failures on targets with a
15 ! crappy libm. But, a target where fmod follows C99 Annex F is
16 ! fine. Also, targets where GCC inline expands fmod (such as x86(-64))
24 if (t
< 0.) call abort
28 if (t
< 0.) call abort
32 if (t
> 0.) call abort
36 if (t
< 0.) call abort
40 if (t
< 0.) call abort
44 if (t
> 0.) call abort
48 if (t
> 0.) call abort
52 if (t
> 0.) call abort
54 end program mod_sign0_1