Deleted Added
full compact
e_log10.c (251024) e_log10.c (251292)
1
2/* @(#)e_log10.c 1.3 95/01/18 */
3/*
4 * ====================================================
5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 *
7 * Developed at SunSoft, a Sun Microsystems, Inc. business.
8 * Permission to use, copy, modify, and distribute this
9 * software is freely granted, provided that this notice
10 * is preserved.
11 * ====================================================
12 */
13
14#include <sys/cdefs.h>
1
2/* @(#)e_log10.c 1.3 95/01/18 */
3/*
4 * ====================================================
5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 *
7 * Developed at SunSoft, a Sun Microsystems, Inc. business.
8 * Permission to use, copy, modify, and distribute this
9 * software is freely granted, provided that this notice
10 * is preserved.
11 * ====================================================
12 */
13
14#include <sys/cdefs.h>
15__FBSDID("$FreeBSD: head/lib/msun/src/e_log10.c 251024 2013-05-27 08:50:10Z das $");
15__FBSDID("$FreeBSD: head/lib/msun/src/e_log10.c 251292 2013-06-03 09:14:31Z das $");
16
17/*
18 * Return the base 10 logarithm of x. See e_log.c and k_log.h for most
19 * comments.
20 *
21 * log10(x) = (f - 0.5*f*f + k_log1p(f)) / ln10 + k * log10(2)
22 * in not-quite-routine extra precision.
23 */
24
16
17/*
18 * Return the base 10 logarithm of x. See e_log.c and k_log.h for most
19 * comments.
20 *
21 * log10(x) = (f - 0.5*f*f + k_log1p(f)) / ln10 + k * log10(2)
22 * in not-quite-routine extra precision.
23 */
24
25#include <float.h>
26
25#include "math.h"
26#include "math_private.h"
27#include "k_log.h"
28
29static const double
30two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
31ivln10hi = 4.34294481878168880939e-01, /* 0x3fdbcb7b, 0x15200000 */
32ivln10lo = 2.50829467116452752298e-11, /* 0x3dbb9438, 0xca9aadd5 */

--- 48 unchanged lines hidden (view full) ---

81 * with some parallelism and it reduces the error for many args.
82 */
83 w = y2 + val_hi;
84 val_lo += (y2 - w) + val_hi;
85 val_hi = w;
86
87 return val_lo + val_hi;
88}
27#include "math.h"
28#include "math_private.h"
29#include "k_log.h"
30
31static const double
32two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
33ivln10hi = 4.34294481878168880939e-01, /* 0x3fdbcb7b, 0x15200000 */
34ivln10lo = 2.50829467116452752298e-11, /* 0x3dbb9438, 0xca9aadd5 */

--- 48 unchanged lines hidden (view full) ---

83 * with some parallelism and it reduces the error for many args.
84 */
85 w = y2 + val_hi;
86 val_lo += (y2 - w) + val_hi;
87 val_hi = w;
88
89 return val_lo + val_hi;
90}
91
92#if (LDBL_MANT_DIG == 53)
93__weak_reference(log10, log10l);
94#endif