s_exp2l.c (176074) | s_exp2l.c (176231) |
---|---|
1/*- 2 * Copyright (c) 2005-2008 David Schultz <das@FreeBSD.ORG> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005-2008 David Schultz <das@FreeBSD.ORG> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/lib/msun/ld80/s_exp2l.c 176074 2008-02-07 03:17:05Z bde $"); | 28__FBSDID("$FreeBSD: head/lib/msun/ld80/s_exp2l.c 176231 2008-02-13 10:44:44Z bde $"); |
29 30#include <float.h> 31#include <stdint.h> 32 33#ifdef __i386__ 34#include <ieeefp.h> 35#endif 36 --- 184 unchanged lines hidden (view full) --- 221 222 /* Filter out exceptional cases. */ 223 u.e = x; 224 hx = u.xbits.expsign; 225 ix = hx & EXPMASK; 226 if (ix >= BIAS + 14) { /* |x| >= 16384 or x is NaN */ 227 if (ix == BIAS + LDBL_MAX_EXP) { 228 if (u.xbits.man != 1ULL << 63 || (hx & 0x8000) == 0) | 29 30#include <float.h> 31#include <stdint.h> 32 33#ifdef __i386__ 34#include <ieeefp.h> 35#endif 36 --- 184 unchanged lines hidden (view full) --- 221 222 /* Filter out exceptional cases. */ 223 u.e = x; 224 hx = u.xbits.expsign; 225 ix = hx & EXPMASK; 226 if (ix >= BIAS + 14) { /* |x| >= 16384 or x is NaN */ 227 if (ix == BIAS + LDBL_MAX_EXP) { 228 if (u.xbits.man != 1ULL << 63 || (hx & 0x8000) == 0) |
229 return (x); /* x is NaN or +Inf */ | 229 return (x + x); /* x is +Inf or NaN */ |
230 else 231 return (0.0); /* x is -Inf */ 232 } 233 if (x >= 16384) 234 return (huge * huge); /* overflow */ 235 if (x <= -16446) 236 return (twom10000 * twom10000); /* underflow */ 237 } else if (ix <= BIAS - 66) { /* |x| < 0x1p-66 */ --- 57 unchanged lines hidden --- | 230 else 231 return (0.0); /* x is -Inf */ 232 } 233 if (x >= 16384) 234 return (huge * huge); /* overflow */ 235 if (x <= -16446) 236 return (twom10000 * twom10000); /* underflow */ 237 } else if (ix <= BIAS - 66) { /* |x| < 0x1p-66 */ --- 57 unchanged lines hidden --- |