10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 #pragma weak expm1l = __expm1l
31 #if !defined(__sparc)
32 #error Unsupported architecture
33 #endif
34
35 /*
36 * expm1l(x)
37 *
38 * Table driven method
39 * Written by K.C. Ng, June 1995.
40 * Algorithm :
41 * 1. expm1(x) = x if x<2**-114
42 * 2. if |x| <= 0.0625 = 1/16, use approximation
43 * expm1(x) = x + x*P/(2-P)
44 * where
45 * P = x - z*(P1+z*(P2+z*(P3+z*(P4+z*(P5+z*P6+z*P7))))), z = x*x;
46 * (this formula is derived from
47 * 2-P+x = R = x*(exp(x)+1)/(exp(x)-1) ~ 2 + x*x/6 - x^4/360 + ...)
48 *
49 * P1 = 1.66666666666666666666666666666638500528074603030e-0001
50 * P2 = -2.77777777777777777777777759668391122822266551158e-0003
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 #pragma weak __expm1l = expm1l
31
32 #if !defined(__sparc)
33 #error Unsupported architecture
34 #endif
35
36 /*
37 * expm1l(x)
38 *
39 * Table driven method
40 * Written by K.C. Ng, June 1995.
41 * Algorithm :
42 * 1. expm1(x) = x if x<2**-114
43 * 2. if |x| <= 0.0625 = 1/16, use approximation
44 * expm1(x) = x + x*P/(2-P)
45 * where
46 * P = x - z*(P1+z*(P2+z*(P3+z*(P4+z*(P5+z*P6+z*P7))))), z = x*x;
47 * (this formula is derived from
48 * 2-P+x = R = x*(exp(x)+1)/(exp(x)-1) ~ 2 + x*x/6 - x^4/360 + ...)
49 *
50 * P1 = 1.66666666666666666666666666666638500528074603030e-0001
51 * P2 = -2.77777777777777777777777759668391122822266551158e-0003
|