Deleted Added
full compact
s_expm1.c (226596) s_expm1.c (251024)
1/* @(#)s_expm1.c 5.1 93/09/24 */
2/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13#include <sys/cdefs.h>
1/* @(#)s_expm1.c 5.1 93/09/24 */
2/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13#include <sys/cdefs.h>
14__FBSDID("$FreeBSD: head/lib/msun/src/s_expm1.c 226596 2011-10-21 06:26:38Z das $");
14__FBSDID("$FreeBSD: head/lib/msun/src/s_expm1.c 251024 2013-05-27 08:50:10Z das $");
15
16/* expm1(x)
17 * Returns exp(x)-1, the exponential of x minus 1.
18 *
19 * Method
20 * 1. Argument reduction:
21 * Given x, find r and integer k such that
22 *

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

110
111#include <float.h>
112
113#include "math.h"
114#include "math_private.h"
115
116static const double
117one = 1.0,
15
16/* expm1(x)
17 * Returns exp(x)-1, the exponential of x minus 1.
18 *
19 * Method
20 * 1. Argument reduction:
21 * Given x, find r and integer k such that
22 *

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

110
111#include <float.h>
112
113#include "math.h"
114#include "math_private.h"
115
116static const double
117one = 1.0,
118huge = 1.0e+300,
119tiny = 1.0e-300,
120o_threshold = 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */
121ln2_hi = 6.93147180369123816490e-01,/* 0x3fe62e42, 0xfee00000 */
122ln2_lo = 1.90821492927058770002e-10,/* 0x3dea39ef, 0x35793c76 */
123invln2 = 1.44269504088896338700e+00,/* 0x3ff71547, 0x652b82fe */
124/* Scaled Q's: Qn_here = 2**n * Qn_above, for R(2*z) where z = hxs = x*x/2: */
125Q1 = -3.33333333333331316428e-02, /* BFA11111 111110F4 */
126Q2 = 1.58730158725481460165e-03, /* 3F5A01A0 19FE5585 */
127Q3 = -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */
128Q4 = 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */
129Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
130
118tiny = 1.0e-300,
119o_threshold = 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */
120ln2_hi = 6.93147180369123816490e-01,/* 0x3fe62e42, 0xfee00000 */
121ln2_lo = 1.90821492927058770002e-10,/* 0x3dea39ef, 0x35793c76 */
122invln2 = 1.44269504088896338700e+00,/* 0x3ff71547, 0x652b82fe */
123/* Scaled Q's: Qn_here = 2**n * Qn_above, for R(2*z) where z = hxs = x*x/2: */
124Q1 = -3.33333333333331316428e-02, /* BFA11111 111110F4 */
125Q2 = 1.58730158725481460165e-03, /* 3F5A01A0 19FE5585 */
126Q3 = -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */
127Q4 = 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */
128Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
129
130static volatile double huge = 1.0e+300;
131
131double
132expm1(double x)
133{
134 double y,hi,lo,c,t,e,hxs,hfx,r1,twopk;
135 int32_t k,xsb;
136 u_int32_t hx;
137
138 GET_HIGH_WORD(hx,x);

--- 79 unchanged lines hidden ---
132double
133expm1(double x)
134{
135 double y,hi,lo,c,t,e,hxs,hfx,r1,twopk;
136 int32_t k,xsb;
137 u_int32_t hx;
138
139 GET_HIGH_WORD(hx,x);

--- 79 unchanged lines hidden ---