s_expm1.c (251024) | s_expm1.c (251343) |
---|---|
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 251024 2013-05-27 08:50:10Z das $"); | 14__FBSDID("$FreeBSD: head/lib/msun/src/s_expm1.c 251343 2013-06-03 19:51:32Z kargl $"); |
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 * --- 188 unchanged lines hidden (view full) --- 211 SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */ 212 y = x-(e+t); 213 y += one; 214 y = y*twopk; 215 } 216 } 217 return y; 218} | 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 * --- 188 unchanged lines hidden (view full) --- 211 SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */ 212 y = x-(e+t); 213 y += one; 214 y = y*twopk; 215 } 216 } 217 return y; 218} |
219 220#if (LDBL_MANT_DIG == 53) 221__weak_reference(expm1, expm1l); 222#endif |
|