s_expl.c (260066) | s_expl.c (262613) |
---|---|
1/*- 2 * Copyright (c) 2009-2013 Steven G. Kargl 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * Optimized by Bruce D. Evans. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009-2013 Steven G. Kargl 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * Optimized by Bruce D. Evans. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/lib/msun/ld128/s_expl.c 260066 2013-12-30 00:51:25Z kargl $"); | 30__FBSDID("$FreeBSD: head/lib/msun/ld128/s_expl.c 262613 2014-02-28 18:06:00Z dim $"); |
31 32/* 33 * ld128 version of s_expl.c. See ../ld80/s_expl.c for most comments. 34 */ 35 36#include <float.h> 37 38#include "fpmath.h" --- 87 unchanged lines hidden (view full) --- 126static const double 127T1 = -0.1659, /* ~-30.625/128 * log(2) */ 128T2 = 0.1659, /* ~30.625/128 * log(2) */ 129T3 = 0.03125; 130 131/* 132 * Domain [-0.1659, 0.03125], range ~[2.9134e-44, 1.8404e-37]: 133 * |(exp(x)-1-x-x**2/2)/x - p(x)| < 2**-122.03 | 31 32/* 33 * ld128 version of s_expl.c. See ../ld80/s_expl.c for most comments. 34 */ 35 36#include <float.h> 37 38#include "fpmath.h" --- 87 unchanged lines hidden (view full) --- 126static const double 127T1 = -0.1659, /* ~-30.625/128 * log(2) */ 128T2 = 0.1659, /* ~30.625/128 * log(2) */ 129T3 = 0.03125; 130 131/* 132 * Domain [-0.1659, 0.03125], range ~[2.9134e-44, 1.8404e-37]: 133 * |(exp(x)-1-x-x**2/2)/x - p(x)| < 2**-122.03 |
134/* | 134 * |
135 * XXX none of the long double C or D coeffs except C10 is correctly printed. 136 * If you re-print their values in %.35Le format, the result is always 137 * different. For example, the last 2 digits in C3 should be 59, not 67. 138 * 67 is apparently from rounding an extra-precision value to 36 decimal 139 * places. 140 */ 141static const long double 142C3 = 1.66666666666666666666666666666666667e-1L, --- 184 unchanged lines hidden --- | 135 * XXX none of the long double C or D coeffs except C10 is correctly printed. 136 * If you re-print their values in %.35Le format, the result is always 137 * different. For example, the last 2 digits in C3 should be 59, not 67. 138 * 67 is apparently from rounding an extra-precision value to 36 decimal 139 * places. 140 */ 141static const long double 142C3 = 1.66666666666666666666666666666666667e-1L, --- 184 unchanged lines hidden --- |