]> git.ipfire.org Git - thirdparty/glibc.git/commit
alpha: fix floor on sNaN input
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 2 Aug 2016 07:18:59 +0000 (09:18 +0200)
committerMike Frysinger <vapier@gentoo.org>
Thu, 8 Dec 2016 05:57:36 +0000 (00:57 -0500)
commit9b34c1494d8e61bb3d718e2ea83b856030476737
tree066ebf866459ea361aab5318d7982c3d33cdaa45
parent2afb8a945ddc104c5ef9aa61f32427c19b681232
alpha: fix floor on sNaN input

The alpha version of floor wrongly return sNaN for sNaN input. Fix that
by checking for NaN and by returning the input value added with itself
in that case.

Finally remove the code to handle inexact exception, floor should never
generate such an exception.

Changelog:
* sysdeps/alpha/fpu/s_floor.c (__floor): Add argument with itself
when it is a NaN.
[_IEEE_FP_INEXACT] Remove.
* sysdeps/alpha/fpu/s_floorf.c (__floorf): Likewise.

(cherry picked from commit 65cc568cf57156e5230db9a061645e54ff028a41)
(cherry picked from commit 1912cc082df4739c2388c375f8d486afdaa7d49b)
sysdeps/alpha/fpu/s_floor.c
sysdeps/alpha/fpu/s_floorf.c