This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/19380] strtod does not raise "inexact"
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 28 Oct 2016 00:41:34 +0000
- Subject: [Bug math/19380] strtod does not raise "inexact"
- Auto-submitted: auto-generated
- References: <bug-19380-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19380
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 4725d33eed118d69b8110285f7741cde9ddc8b4f (commit)
from 61668b22f5d0efac44bbedad0e738faa6f0820ff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4725d33eed118d69b8110285f7741cde9ddc8b4f
commit 4725d33eed118d69b8110285f7741cde9ddc8b4f
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Oct 28 00:40:23 2016 +0000
Make strtod raise "inexact" exceptions (bug 19380).
The strtod function should raise the "inexact" exception when its
result is inexact, but fails to do so except in the case of underflow
or overflow. This patch fixes it to do so for all inexact results.
tst-strtod-round is extended to test for this exception; the generator
is fixed to properly mark inexact results as such in the case where
the inexactness is from the mpfr_subnormalize step.
Tested for x86_64, x86 and powerpc.
[BZ #19380]
* stdlib/strtod_l.c (round_and_return): Force "inexact" exception
for inexact results.
* stdlib/gen-tst-strtod-round.c (string_to_fp): Return indication
of inexact result where mpfr_subnormalize is the only inexact
step.
* stdlib/tst-strtod-round-data.h: Regenerated.
* stdlib/tst-strtod-round-skeleton.c [!FE_INEXACT] (FE_INEXACT):
Define to 0.
(GEN_ONE_TEST): Test inexact exceptions raised are as expected.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++++++++++++
stdlib/gen-tst-strtod-round.c | 4 ++--
stdlib/strtod_l.c | 14 +++++++++++---
stdlib/tst-strtod-round-data.h | 26 +++++++++++++-------------
stdlib/tst-strtod-round-skeleton.c | 18 ++++++++++++++++++
5 files changed, 57 insertions(+), 18 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.