about summary refs log tree commit diff
path: root/elf/readlib.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-02-19 01:07:40 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-02-19 01:07:40 +0000
commitc091488e5172025eb4e96fcc1141edb89dbc9afd (patch)
tree5081dc911a41c3bfe40e50311b3e8072eca3fe02 /elf/readlib.c
parent9120a57f4819965fa976d5de3b1d27b284319ed1 (diff)
downloadglibc-c091488e5172025eb4e96fcc1141edb89dbc9afd.tar.gz
glibc-c091488e5172025eb4e96fcc1141edb89dbc9afd.tar.xz
glibc-c091488e5172025eb4e96fcc1141edb89dbc9afd.zip
Fix ldbl-128ibm powl overflow handling (bug 19674).
The ldbl-128ibm implementation of powl has some problems in the case
of overflow or underflow, which are mainly visible in non-default
rounding modes.

* When overflow or underflow is detected early, the correct sign of an
  overflowing or underflowing result is not allowed for.  This is
  mostly hidden in the default rounding mode by the errno-setting
  wrappers recomputing the result (except in non-default
  error-handling modes such as -lieee), but visible in other rounding
  modes where a result that is not zero or infinity causes the
  wrappers not to do the recomputation.

* The final scaling is done before the sign is incorporated in the
  result, but should be done afterwards for correct overflowing and
  underflowing results in directed rounding modes.

This patch fixes those problems.  Tested for powerpc.

	[BZ #19674]
	* sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Include
	sign in overflowing and underflowing results when overflow or
	underflow is detected early.  Include sign in result before rather
	than after scaling.
Diffstat (limited to 'elf/readlib.c')
0 files changed, 0 insertions, 0 deletions