about summary refs log tree commit diff
path: root/math/e_scalbl.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Do not call __nan in scalb functions.Joseph Myers2016-08-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When libm functions return a NaN: if it is for NaN input, it should be computed from that input (e.g. adding it to itself), so that payloads are propagated and signaling NaNs quieted, while if it is for non-NaN input, it should be produced by a computation such as (x - x) / (x - x), which raises "invalid" at the same time as producing an appropriate NaN, so avoiding any need for a call to feraiseexcept. Various libm functions, however, call __nan ("") (or __nanf or __nanl) to determine the NaN to return, together with using feraiseexcept (FE_INVALID) to raise the exception. sysdeps/generic/math_private.h has an optimization for those functions with constant "" argument so this doesn't actually involve a call to the __nan function, but it is still not the preferred approach for producing NaNs. (The optimized code also always uses the NAN macro, i.e. produces a default NaN for float converted to whatever the target type is, and on some architectures that may not be the same as the preferred default NaN for double or long double.) This patch fixes the scalb functions to use the conventional method of generating NaNs and raising "invalid" with an appropriate computation. (Most instances of this issue are in the complex functions, where it can more readily be fixed once they have been made type-generic and so only a third as many places need fixing. Some of the complex functions use __nan ("") + __nan (""), where the addition serves no purpose whatsoever.) Tested for x86_64 and x86. * math/e_scalb.c: Do not include <fenv.h>. (invalid_fn): Do calculation resulting in NaN instead of raising FE_INVALID and returning a NaN explicitly. * math/e_scalbf.c: Do not include <fenv.h>. (invalid_fn): Do calculation resulting in NaN instead of raising FE_INVALID and returning a NaN explicitly. * math/e_scalbl.c: Do not include <fenv.h>. (invalid_fn): Do calculation resulting in NaN instead of raising FE_INVALID and returning a NaN explicitly.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* This patch renames all uses of __isinf*, __isnan*, __finite* and __signbit* ↵Wilco Dijkstra2015-06-031-3/+3
| | | | to use standard C99 macros. This has no effect on generated code.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Fix scalb spurious "invalid" exceptions (bug 16770).Joseph Myers2014-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | This patch fixes bug 16770, spurious "invalid" exceptions from scalb when testing whether the second argument is an integer, by inserting appropriate range checks to determine whether a cast to int is safe. (Note that invalid_fn is a function that handles both nonintegers and large integers, distinguishing them reliably using functions such as __rint; note also that there are no issues with scalb needing to avoid spurious "inexact" exceptions - it's an old-POSIX XSI function, not a standard C function bound to an IEEE 754 operation - although the return value is still fully determined.) Tested x86_64 and x86. [BZ #16770] * math/e_scalb.c (__ieee754_scalb): Check second argument is not too large before casting to int. * math/e_scalbf.c (__ieee754_scalbf): Likewise. * math/e_scalbl.c (__ieee754_scalbl): Likewise. * math/libm-test.inc (scalb_test_data): Add more tests.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-3/+3
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Optimize libmUlrich Drepper2011-10-121-65/+49
| | | | | libm is now somewhat integrated with gcc's -ffinite-math-only option and lots of the wrapper functions have been optimized.
* Use private math_private.h in files in math/Ulrich Drepper2011-10-081-1/+1
|
* Moved to csu/errno-loc.c.Ulrich Drepper2005-12-141-0/+75
|
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-75/+0
|
* 2.5-18.1Jakub Jelinek2007-07-121-0/+75