Deleted Added
full compact
s_expm1f.c (226596) s_expm1f.c (251024)
1/* s_expm1f.c -- float version of s_expm1.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#include <sys/cdefs.h>
1/* s_expm1f.c -- float version of s_expm1.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#include <sys/cdefs.h>
17__FBSDID("$FreeBSD: head/lib/msun/src/s_expm1f.c 226596 2011-10-21 06:26:38Z das $");
17__FBSDID("$FreeBSD: head/lib/msun/src/s_expm1f.c 251024 2013-05-27 08:50:10Z das $");
18
19#include <float.h>
20
21#include "math.h"
22#include "math_private.h"
23
24static const float
25one = 1.0,
18
19#include <float.h>
20
21#include "math.h"
22#include "math_private.h"
23
24static const float
25one = 1.0,
26huge = 1.0e+30,
27tiny = 1.0e-30,
28o_threshold = 8.8721679688e+01,/* 0x42b17180 */
29ln2_hi = 6.9313812256e-01,/* 0x3f317180 */
30ln2_lo = 9.0580006145e-06,/* 0x3717f7d1 */
31invln2 = 1.4426950216e+00,/* 0x3fb8aa3b */
32/*
33 * Domain [-0.34568, 0.34568], range ~[-6.694e-10, 6.696e-10]:
34 * |6 / x * (1 + 2 * (1 / (exp(x) - 1) - 1 / x)) - q(x)| < 2**-30.04
35 * Scaled coefficients: Qn_here = 2**n * Qn_for_q (see s_expm1.c):
36 */
37Q1 = -3.3333212137e-2, /* -0x888868.0p-28 */
38Q2 = 1.5807170421e-3; /* 0xcf3010.0p-33 */
39
26tiny = 1.0e-30,
27o_threshold = 8.8721679688e+01,/* 0x42b17180 */
28ln2_hi = 6.9313812256e-01,/* 0x3f317180 */
29ln2_lo = 9.0580006145e-06,/* 0x3717f7d1 */
30invln2 = 1.4426950216e+00,/* 0x3fb8aa3b */
31/*
32 * Domain [-0.34568, 0.34568], range ~[-6.694e-10, 6.696e-10]:
33 * |6 / x * (1 + 2 * (1 / (exp(x) - 1) - 1 / x)) - q(x)| < 2**-30.04
34 * Scaled coefficients: Qn_here = 2**n * Qn_for_q (see s_expm1.c):
35 */
36Q1 = -3.3333212137e-2, /* -0x888868.0p-28 */
37Q2 = 1.5807170421e-3; /* 0xcf3010.0p-33 */
38
39static volatile float huge = 1.0e+30;
40
40float
41expm1f(float x)
42{
43 float y,hi,lo,c,t,e,hxs,hfx,r1,twopk;
44 int32_t k,xsb;
45 u_int32_t hx;
46
47 GET_FLOAT_WORD(hx,x);

--- 76 unchanged lines hidden ---
41float
42expm1f(float x)
43{
44 float y,hi,lo,c,t,e,hxs,hfx,r1,twopk;
45 int32_t k,xsb;
46 u_int32_t hx;
47
48 GET_FLOAT_WORD(hx,x);

--- 76 unchanged lines hidden ---