This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping Re: Make strtod respect the rounding mode (bug 14518)


On 09/12/2012 02:32 PM, Joseph S. Myers wrote:
> 2012-09-12  Joseph Myers  <joseph@codesourcery.com>
> 
> 	[BZ #14518]
> 	* include/rounding-mode.h: New file.
> 	* sysdeps/generic/get-rounding-mode.h: Likewise.
> 	* sysdeps/s390/fpu/get-rounding-mode.h: Likewise.
> 	* stdlib/strtod_l.c: Include <rounding-mode.h>.
> 	(MAX_VALUE): New macro.
> 	(MIN_VALUE): Likewise.
> 	(overflow_value): New function.
> 	(underflow_value): Likewise.
> 	(round_and_return): Use overflow_value and underflow_value to
> 	determine return values in overflow and underflow cases.  Use
> 	round_away to determine rounding depending on rounding mode.
> 	(____STRTOF_INTERNAL): Use overflow_value and underflow_value to
> 	determine return values in overflow and underflow cases.
> 	* stdlib/tst-strtod-round.c: Include <fenv.h>.
> 	(struct test_results): New structure.
> 	(struct test): Use struct test_results to store expected results
> 	for all rounding modes.
> 	(TEST): Include expected results for all rounding modes.
> 	(test_in_one_mode): New function.
> 	(do_test): Use test_in_one_mode to compute and check results.
> 	Check results for all rounding modes.
> 	* stdlib/Makefile ($(objpfx)tst-strtod-round): Depend on
> 	$(link-libm).
> 
> ports/ChangeLog.arm:
> 2012-09-12  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/arm/get-rounding-mode.h: New file.
> 
> ports/ChangeLog.powerpc:
> 2012-09-12  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/powerpc/nofpu/get-rounding-mode.h: New file.

This all looks good to me.

I'll supply an alpha get-rounding-mode.h once this is in.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]