4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-20 16:01:10 +08:00

2010-02-11 Craig Howland <howland@LGSInnovations.com>

* libc/include/machine/ieeefp.h:  isfinite macro modified to run faster
        by only calling fpclassify once instead of possibly twice.
This commit is contained in:
Jeff Johnston 2010-02-11 21:03:51 +00:00
parent 451a8eb09a
commit 45c8c6469a
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2010-02-11 Craig Howland <howland@LGSInnovations.com>
* libc/include/machine/ieeefp.h: isfinite macro modified to run faster
by only calling fpclassify once instead of possibly twice.
2010-02-11 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_ilogb.c: Adjust documentation to reflect new returns

View File

@ -80,10 +80,11 @@
#ifdef __SPU__
#define __IEEE_BIG_ENDIAN
#define isfinite(y) \
(__extension__ ({__typeof__(y) __y = (y); \
(sizeof (__y) == sizeof (float)) ? (1) : \
fpclassify(__y) != FP_INFINITE && fpclassify(__y) != FP_NAN;}))
#define isfinite(__y) \
(__extension__ ({int __cy; \
(sizeof (__y) == sizeof (float)) ? (1) : \
(__cy = fpclassify(__y)) != FP_INFINITE && __cy != FP_NAN;}))
#define isinf(__x) ((sizeof (__x) == sizeof (float)) ? (0) : __isinfd(__x))
#define isnan(__x) ((sizeof (__x) == sizeof (float)) ? (0) : __isnand(__x))