5261 libm should stop using synonyms.h 5298 fabs is 0-sized, confuses dis(1) and others Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Approved by: Gordon Ross <gwr@nexenta.com>

```
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 log10 = __log10
30
31 /* INDENT OFF */
32 /*
33 * log10(x) = log(x)/log10
34 *
35 * Base on Table look-up algorithm with product polynomial
36 * approximation for log(x).
37 *
38 * By K.C. Ng, Nov 29, 2004
39 *
40 * (a). For x in [1-0.125, 1+0.125], from log.c we have
41 * log(x) = f + ((a1*f^2) *
42 * ((a2 + (a3*f)*(a4+f)) + (f^3)*(a5+f))) *
43 * (((a6 + f*(a7+f)) + (f^3)*(a8+f)) *
44 * ((a9 + (a10*f)*(a11+f)) + (f^3)*(a12+f)))
45 * where f = x - 1.
46 * (i) modify a1 <- a1 / log10
47 * (ii) 1/log10 = 0.4342944819...
48 * = 0.4375 - 0.003205518... (7 bit shift)
49 * Let lgv = 0.4375 - 1/log10, then
``` | ```
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 __log10 = log10
30
31 /* INDENT OFF */
32 /*
33 * log10(x) = log(x)/log10
34 *
35 * Base on Table look-up algorithm with product polynomial
36 * approximation for log(x).
37 *
38 * By K.C. Ng, Nov 29, 2004
39 *
40 * (a). For x in [1-0.125, 1+0.125], from log.c we have
41 * log(x) = f + ((a1*f^2) *
42 * ((a2 + (a3*f)*(a4+f)) + (f^3)*(a5+f))) *
43 * (((a6 + f*(a7+f)) + (f^3)*(a8+f)) *
44 * ((a9 + (a10*f)*(a11+f)) + (f^3)*(a12+f)))
45 * where f = x - 1.
46 * (i) modify a1 <- a1 / log10
47 * (ii) 1/log10 = 0.4342944819...
48 * = 0.4375 - 0.003205518... (7 bit shift)
49 * Let lgv = 0.4375 - 1/log10, then
``` |