https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235

--- Comment #18 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 38097
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38097&action=edit
Patch with correct rounding

With the attached patch I get the expected rounding

...
-6pf18.2 y=              0.00
-5pf18.2 y=              0.01
-4pf18.2 y=              0.06
...

While I think the handling of nafter < 0 is correct, it is probably a too big
hammer since the expected output should be all zeroes.

TODO:
(1) More testing, including the different rounding modes.
(2) Add (a) test case(s).

Reply via email to