diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2014-12-15 16:13:01 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2014-12-15 17:27:49 +0100 |
commit | f8e05f3850e51673522216f23533bf7146359dcd (patch) | |
tree | 388ffe38b5648af914bf0c9272f1768982f441bf /extra/locale/tst_nl_langinfo.c | |
parent | 067637375658047d70c296606ae17ef0bc86499d (diff) |
stdio: Fix printing 0.0
We were relying on FE_DIVBYZERO being turned off when printing
"%f", +-.0
Avoid the whole issue by looking at the sign-bit (in a rough
approximation).
Note that we do not handle gracefully:
printf ("\n%llf\n", -0.0);
printf ("\n%llf\n", 0.0);
nor %Lf for both when NOT cast to long double. Avoiding an FPE due to
broken numbers like these does not make sense to me.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'extra/locale/tst_nl_langinfo.c')
0 files changed, 0 insertions, 0 deletions