From 7edb55ce06ab1fa716a062cd1cb6682585bb449d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Oct 2011 10:18:26 -0400 Subject: Optimize use of isnan, isinf, finite --- sysdeps/ieee754/ldbl-96/s_isinf_nsl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sysdeps/ieee754/ldbl-96/s_isinf_nsl.c (limited to 'sysdeps/ieee754/ldbl-96') diff --git a/sysdeps/ieee754/ldbl-96/s_isinf_nsl.c b/sysdeps/ieee754/ldbl-96/s_isinf_nsl.c new file mode 100644 index 0000000000..aa590307ea --- /dev/null +++ b/sysdeps/ieee754/ldbl-96/s_isinf_nsl.c @@ -0,0 +1,18 @@ +/* + * Written by Ulrich Drepper . + */ + +/* + * __isinf_nsl(x) returns != 0 if x is ±inf, else 0; + */ + +#include "math.h" +#include "math_private.h" + +int +__isinf_nsl (long double x) +{ + int32_t se,hx,lx; + GET_LDOUBLE_WORDS(se,hx,lx,x); + return !(((se & 0x7fff) ^ 0x7fff) | lx | (hx & 0x7fffffff)); +} -- cgit 1.4.1