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/ld128/s_exp2l.c 176074 2008-02-07 03:17:05Z bde $"); | 28__FBSDID("$FreeBSD: head/lib/msun/ld128/s_exp2l.c 176231 2008-02-13 10:44:44Z bde $"); |
29 30#include <float.h> 31#include <stdint.h> 32 33#include "fpmath.h" 34#include "math.h" 35 36#define TBLBITS 7 --- 329 unchanged lines hidden (view full) --- 366 /* Filter out exceptional cases. */ 367 hx = u.xbits.expsign; 368 ix = hx & EXPMASK; 369 if (ix >= BIAS + 14) { /* |x| >= 16384 */ 370 if (ix == BIAS + LDBL_MAX_EXP) { 371 if (u.xbits.manh != 0 372 || u.xbits.manl != 0 373 || (hx & 0x8000) == 0) | 29 30#include <float.h> 31#include <stdint.h> 32 33#include "fpmath.h" 34#include "math.h" 35 36#define TBLBITS 7 --- 329 unchanged lines hidden (view full) --- 366 /* Filter out exceptional cases. */ 367 hx = u.xbits.expsign; 368 ix = hx & EXPMASK; 369 if (ix >= BIAS + 14) { /* |x| >= 16384 */ 370 if (ix == BIAS + LDBL_MAX_EXP) { 371 if (u.xbits.manh != 0 372 || u.xbits.manl != 0 373 || (hx & 0x8000) == 0) |
374 return (x); /* x is NaN or +Inf */ | 374 return (x + x); /* x is NaN or +Inf */ |
375 else 376 return (0.0); /* x is -Inf */ 377 } 378 if (x >= 16384) 379 return (huge * huge); /* overflow */ 380 if (x <= -16495) 381 return (twom10000 * twom10000); /* underflow */ 382 } else if (ix <= BIAS - 115) { /* |x| < 0x1p-115 */ --- 48 unchanged lines hidden --- | 375 else 376 return (0.0); /* x is -Inf */ 377 } 378 if (x >= 16384) 379 return (huge * huge); /* overflow */ 380 if (x <= -16495) 381 return (twom10000 * twom10000); /* underflow */ 382 } else if (ix <= BIAS - 115) { /* |x| < 0x1p-115 */ --- 48 unchanged lines hidden --- |