9 * or http://www.opensolaris.org/os/licensing.
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 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 */
24 /*
25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 #pragma weak log = __log
30
31 /* INDENT OFF */
32 /*
33 * log(x)
34 * Table look-up algorithm with product polynomial approximation.
35 * By K.C. Ng, Oct 23, 2004. Updated Oct 18, 2005.
36 *
37 * (a). For x in [1-0.125, 1+0.1328125], using a special approximation:
38 * Let f = x - 1 and z = f*f.
39 * return f + ((a1*z) *
40 * ((a2 + (a3*f)*(a4+f)) + (f*z)*(a5+f))) *
41 * (((a6 + f*(a7+f)) + (f*z)*(a8+f)) *
42 * ((a9 + (a10*f)*(a11+f)) + (f*z)*(a12+f)))
43 * a1 -6.88821452420390473170286327331268694251775741577e-0002,
44 * a2 1.97493380704769294631262255279580131173133850098e+0000,
45 * a3 2.24963218866067560242072431719861924648284912109e+0000,
46 * a4 -9.02975906958474405783476868236903101205825805664e-0001,
47 * a5 -1.47391630715542865104339398385491222143173217773e+0000,
48 * a6 1.86846544648220058704168877738993614912033081055e+0000,
49 * a7 1.82277370459347465292410106485476717352867126465e+0000,
|
9 * or http://www.opensolaris.org/os/licensing.
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 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 */
24 /*
25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 #pragma weak __log = log
30
31 /* INDENT OFF */
32 /*
33 * log(x)
34 * Table look-up algorithm with product polynomial approximation.
35 * By K.C. Ng, Oct 23, 2004. Updated Oct 18, 2005.
36 *
37 * (a). For x in [1-0.125, 1+0.1328125], using a special approximation:
38 * Let f = x - 1 and z = f*f.
39 * return f + ((a1*z) *
40 * ((a2 + (a3*f)*(a4+f)) + (f*z)*(a5+f))) *
41 * (((a6 + f*(a7+f)) + (f*z)*(a8+f)) *
42 * ((a9 + (a10*f)*(a11+f)) + (f*z)*(a12+f)))
43 * a1 -6.88821452420390473170286327331268694251775741577e-0002,
44 * a2 1.97493380704769294631262255279580131173133850098e+0000,
45 * a3 2.24963218866067560242072431719861924648284912109e+0000,
46 * a4 -9.02975906958474405783476868236903101205825805664e-0001,
47 * a5 -1.47391630715542865104339398385491222143173217773e+0000,
48 * a6 1.86846544648220058704168877738993614912033081055e+0000,
49 * a7 1.82277370459347465292410106485476717352867126465e+0000,
|