Deleted Added
full compact
s_exp2.c (176074) s_exp2.c (176231)
1/*-
2 * Copyright (c) 2005 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 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/src/s_exp2.c 176074 2008-02-07 03:17:05Z bde $");
28__FBSDID("$FreeBSD: head/lib/msun/src/s_exp2.c 176231 2008-02-13 10:44:44Z bde $");
29
30#include <float.h>
31
32#include "math.h"
33#include "math_private.h"
34
35#define TBLBITS 8
36#define TBLSIZE (1 << TBLBITS)

--- 309 unchanged lines hidden (view full) ---

346
347 /* Filter out exceptional cases. */
348 GET_HIGH_WORD(hx,x);
349 ix = hx & 0x7fffffff; /* high word of |x| */
350 if(ix >= 0x40900000) { /* |x| >= 1024 */
351 if(ix >= 0x7ff00000) {
352 GET_LOW_WORD(lx,x);
353 if(((ix & 0xfffff) | lx) != 0 || (hx & 0x80000000) == 0)
29
30#include <float.h>
31
32#include "math.h"
33#include "math_private.h"
34
35#define TBLBITS 8
36#define TBLSIZE (1 << TBLBITS)

--- 309 unchanged lines hidden (view full) ---

346
347 /* Filter out exceptional cases. */
348 GET_HIGH_WORD(hx,x);
349 ix = hx & 0x7fffffff; /* high word of |x| */
350 if(ix >= 0x40900000) { /* |x| >= 1024 */
351 if(ix >= 0x7ff00000) {
352 GET_LOW_WORD(lx,x);
353 if(((ix & 0xfffff) | lx) != 0 || (hx & 0x80000000) == 0)
354 return (x); /* x is NaN or +Inf */
354 return (x + x); /* x is NaN or +Inf */
355 else
356 return (0.0); /* x is -Inf */
357 }
358 if(x >= 0x1.0p10)
359 return (huge * huge); /* overflow */
360 if(x <= -0x1.0ccp10)
361 return (twom1000 * twom1000); /* underflow */
362 } else if (ix < 0x3c900000) { /* |x| < 0x1p-54 */

--- 34 unchanged lines hidden ---
355 else
356 return (0.0); /* x is -Inf */
357 }
358 if(x >= 0x1.0p10)
359 return (huge * huge); /* overflow */
360 if(x <= -0x1.0ccp10)
361 return (twom1000 * twom1000); /* underflow */
362 } else if (ix < 0x3c900000) { /* |x| < 0x1p-54 */

--- 34 unchanged lines hidden ---