# HG changeset patch # User sanketh # Date 1628855825 0 # Node ID 12a65b83675a319197804d2bf2dff32e180771e2 # Parent a4aeb9fac1b302f71b4eb07f1516deb2ebde51e5 Bug 531915 - part 2 - update fdlibm local patches 4, 8, and 9 r=arai Differential Revision: https://phabricator.services.mozilla.com/D119422 diff --git a/modules/fdlibm/patches/04_include_fdlibm_h_from_math_private_h.patch b/modules/fdlibm/patches/04_include_fdlibm_h_from_math_private_h.patch --- a/modules/fdlibm/patches/04_include_fdlibm_h_from_math_private_h.patch +++ b/modules/fdlibm/patches/04_include_fdlibm_h_from_math_private_h.patch @@ -688,8 +688,177 @@ diff --git a/modules/fdlibm/src/s_truncf #include "math_private.h" static const float huge = 1.0e30F; float truncf(float x) { int32_t i0,j0; +diff --git a/modules/fdlibm/src/e_rem_pio2.cpp b/modules/fdlibm/src/e_rem_pio2.cpp +--- a/modules/fdlibm/src/e_rem_pio2.cpp ++++ b/modules/fdlibm/src/e_rem_pio2.cpp +@@ -19,17 +19,16 @@ + /* __ieee754_rem_pio2(x,y) + * + * return the remainder of x rem pi/2 in y[0]+y[1] + * use __kernel_rem_pio2() + */ + + #include + +-#include "math.h" + #include "math_private.h" + + /* + * invpio2: 53 bits of 2/pi + * pio2_1: first 33 bit of pi/2 + * pio2_1t: pi/2 - pio2_1 + * pio2_2: second 33 bit of pi/2 + * pio2_2t: pi/2 - (pio2_1+pio2_2) + +diff --git a/modules/fdlibm/src/k_cos.cpp b/modules/fdlibm/src/k_cos.cpp +--- a/modules/fdlibm/src/k_cos.cpp ++++ b/modules/fdlibm/src/k_cos.cpp +@@ -48,17 +48,16 @@ + * and tmp having the same precision as x. If they have extra + * precision due to compiler bugs, then the extra precision is + * only good provided it is retained in all terms of the final + * expression for cos(). Retention happens in all cases tested + * under FreeBSD, so don't pessimize things by forcibly clipping + * any extra precision in w. + */ + +-#include "math.h" + #include "math_private.h" + + static const double + one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ + C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ + C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */ + C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ +diff --git a/modules/fdlibm/src/k_rem_pio2.cpp b/modules/fdlibm/src/k_rem_pio2.cpp +--- a/modules/fdlibm/src/k_rem_pio2.cpp ++++ b/modules/fdlibm/src/k_rem_pio2.cpp +@@ -126,17 +126,16 @@ + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + + #include + +-#include "math.h" + #include "math_private.h" + + static const int init_jk[] = {3,4,4,6}; /* initial value for jk */ + + /* + * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi + * + * integer array, contains the (24*i)-th to (24*i+23)-th +diff --git a/modules/fdlibm/src/k_sin.cpp b/modules/fdlibm/src/k_sin.cpp +--- a/modules/fdlibm/src/k_sin.cpp ++++ b/modules/fdlibm/src/k_sin.cpp +@@ -39,17 +39,16 @@ + * ~ sin(x) + (1-x*x/2)*y + * For better accuracy, let + * 3 2 2 2 2 + * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6)))) + * then 3 2 + * sin(x) = x + (S1*x + (x *(r-y/2)+y)) + */ + +-#include "math.h" + #include "math_private.h" + + static const double + half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ + S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ + S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ + S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ + S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ +diff --git a/modules/fdlibm/src/k_tan.cpp b/modules/fdlibm/src/k_tan.cpp +--- a/modules/fdlibm/src/k_tan.cpp ++++ b/modules/fdlibm/src/k_tan.cpp +@@ -44,17 +44,16 @@ + * 3 2 + * tan(x+y) = x + (T1*x + (x *(r+y)+y)) + * + * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then + * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y)) + * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) + */ + +-#include "math.h" + #include "math_private.h" + static const double xxx[] = { + 3.33333333333334091986e-01, /* 3FD55555, 55555563 */ + 1.33333333333201242699e-01, /* 3FC11111, 1110FE7A */ + 5.39682539762260521377e-02, /* 3FABA1BA, 1BB341FE */ + 2.18694882948595424599e-02, /* 3F9664F4, 8406D637 */ + 8.86323982359930005737e-03, /* 3F8226E3, E96E8493 */ + 3.59207910759131235356e-03, /* 3F6D6D22, C9560328 */ +diff --git a/modules/fdlibm/src/s_cos.cpp b/modules/fdlibm/src/s_cos.cpp +--- a/modules/fdlibm/src/s_cos.cpp ++++ b/modules/fdlibm/src/s_cos.cpp +@@ -41,17 +41,16 @@ + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + + #include + +-#include "math.h" + #define INLINE_REM_PIO2 + #include "math_private.h" + #include "e_rem_pio2.c" + + double + cos(double x) + { + double y[2],z=0.0; +diff --git a/modules/fdlibm/src/s_sin.cpp b/modules/fdlibm/src/s_sin.cpp +--- a/modules/fdlibm/src/s_sin.cpp ++++ b/modules/fdlibm/src/s_sin.cpp +@@ -41,17 +41,16 @@ + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + + #include + +-#include "math.h" + #define INLINE_REM_PIO2 + #include "math_private.h" + #include "e_rem_pio2.c" + + double + sin(double x) + { + double y[2],z=0.0; +diff --git a/modules/fdlibm/src/s_tan.cpp b/modules/fdlibm/src/s_tan.cpp +--- a/modules/fdlibm/src/s_tan.cpp ++++ b/modules/fdlibm/src/s_tan.cpp +@@ -40,17 +40,16 @@ + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + + #include + +-#include "math.h" + #define INLINE_REM_PIO2 + #include "math_private.h" + #include "e_rem_pio2.c" + + double + tan(double x) + { + double y[2],z=0.0; \ No newline at end of file diff --git a/modules/fdlibm/patches/08_remove_weak_reference_macro.patch b/modules/fdlibm/patches/08_remove_weak_reference_macro.patch --- a/modules/fdlibm/patches/08_remove_weak_reference_macro.patch +++ b/modules/fdlibm/patches/08_remove_weak_reference_macro.patch @@ -378,8 +378,56 @@ diff --git a/modules/fdlibm/src/s_trunc. } INSERT_WORDS(x,i0,i1); return x; } - -#if LDBL_MANT_DIG == 53 -__weak_reference(trunc, truncl); -#endif +diff --git a/modules/fdlibm/src/s_cos.cpp b/modules/fdlibm/src/s_cos.cpp +--- a/modules/fdlibm/src/s_cos.cpp ++++ b/modules/fdlibm/src/s_cos.cpp +@@ -78,12 +78,8 @@ cos(double x) + case 0: return __kernel_cos(y[0],y[1]); + case 1: return -__kernel_sin(y[0],y[1],1); + case 2: return -__kernel_cos(y[0],y[1]); + default: + return __kernel_sin(y[0],y[1],1); + } + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(cos, cosl); +-#endif +diff --git a/modules/fdlibm/src/s_sin.cpp b/modules/fdlibm/src/s_sin.cpp +--- a/modules/fdlibm/src/s_sin.cpp ++++ b/modules/fdlibm/src/s_sin.cpp +@@ -78,12 +78,8 @@ sin(double x) + case 0: return __kernel_sin(y[0],y[1],1); + case 1: return __kernel_cos(y[0],y[1]); + case 2: return -__kernel_sin(y[0],y[1],1); + default: + return -__kernel_cos(y[0],y[1]); + } + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(sin, sinl); +-#endif +diff --git a/modules/fdlibm/src/s_tan.cpp b/modules/fdlibm/src/s_tan.cpp +--- a/modules/fdlibm/src/s_tan.cpp ++++ b/modules/fdlibm/src/s_tan.cpp +@@ -72,12 +72,8 @@ tan(double x) + + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x,y); + return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even + -1 -- n odd */ + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(tan, tanl); +-#endif diff --git a/modules/fdlibm/patches/09_comment_out_rcsid_variable.patch b/modules/fdlibm/patches/09_comment_out_rcsid_variable.patch --- a/modules/fdlibm/patches/09_comment_out_rcsid_variable.patch +++ b/modules/fdlibm/patches/09_comment_out_rcsid_variable.patch @@ -805,8 +805,201 @@ diff --git a/modules/fdlibm/src/s_truncf /* * truncf(x) * Return x rounded toward 0 to integral value * Method: * Bit twiddling. * Exception: * Inexact flag raised if x not equal to truncf(x). +diff --git a/modules/fdlibm/src/e_rem_pio2.cpp b/modules/fdlibm/src/e_rem_pio2.cpp +--- a/modules/fdlibm/src/e_rem_pio2.cpp ++++ b/modules/fdlibm/src/e_rem_pio2.cpp +@@ -8,18 +8,18 @@ + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + * Optimized by Bruce D. Evans. + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* __ieee754_rem_pio2(x,y) + * + * return the remainder of x rem pi/2 in y[0]+y[1] + * use __kernel_rem_pio2() + */ + + #include + +diff --git a/modules/fdlibm/src/k_cos.cpp b/modules/fdlibm/src/k_cos.cpp +--- a/modules/fdlibm/src/k_cos.cpp ++++ b/modules/fdlibm/src/k_cos.cpp +@@ -6,18 +6,18 @@ + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* + * __kernel_cos( x, y ) + * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * + * Algorithm +diff --git a/modules/fdlibm/src/k_rem_pio2.cpp b/modules/fdlibm/src/k_rem_pio2.cpp +--- a/modules/fdlibm/src/k_rem_pio2.cpp ++++ b/modules/fdlibm/src/k_rem_pio2.cpp +@@ -6,18 +6,18 @@ + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* + * __kernel_rem_pio2(x,y,e0,nx,prec) + * double x[],y[]; int e0,nx,prec; + * + * __kernel_rem_pio2 return the last three digits of N with + * y = x - N*pi/2 + * so that |y| < pi/2. +diff --git a/modules/fdlibm/src/k_sin.cpp b/modules/fdlibm/src/k_sin.cpp +--- a/modules/fdlibm/src/k_sin.cpp ++++ b/modules/fdlibm/src/k_sin.cpp +@@ -6,18 +6,18 @@ + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* __kernel_sin( x, y, iy) + * kernel sin function on ~[-pi/4, pi/4] (except on -0), pi/4 ~ 0.7854 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * Input iy indicates whether y is 0. (if iy=0, y assume to be 0). + * + * Algorithm +diff --git a/modules/fdlibm/src/k_tan.cpp b/modules/fdlibm/src/k_tan.cpp +--- a/modules/fdlibm/src/k_tan.cpp ++++ b/modules/fdlibm/src/k_tan.cpp +@@ -6,18 +6,18 @@ + * + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + + /* INDENT OFF */ +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* __kernel_tan( x, y, k ) + * kernel tan function on ~[-pi/4, pi/4] (except on -0), pi/4 ~ 0.7854 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * Input k indicates whether tan (if k = 1) or -1/tan (if k = -1) is returned. + * + * Algorithm +diff --git a/modules/fdlibm/src/s_cos.cpp b/modules/fdlibm/src/s_cos.cpp +--- a/modules/fdlibm/src/s_cos.cpp ++++ b/modules/fdlibm/src/s_cos.cpp +@@ -5,18 +5,18 @@ + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* cos(x) + * Return cosine function of x. + * + * kernel function: + * __kernel_sin ... sine function on [-pi/4,pi/4] + * __kernel_cos ... cosine function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine +diff --git a/modules/fdlibm/src/s_sin.cpp b/modules/fdlibm/src/s_sin.cpp +--- a/modules/fdlibm/src/s_sin.cpp ++++ b/modules/fdlibm/src/s_sin.cpp +@@ -5,18 +5,18 @@ + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* sin(x) + * Return sine function of x. + * + * kernel function: + * __kernel_sin ... sine function on [-pi/4,pi/4] + * __kernel_cos ... cose function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine +diff --git a/modules/fdlibm/src/s_tan.cpp b/modules/fdlibm/src/s_tan.cpp +--- a/modules/fdlibm/src/s_tan.cpp ++++ b/modules/fdlibm/src/s_tan.cpp +@@ -5,18 +5,18 @@ + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +-#include +-__FBSDID("$FreeBSD$"); ++//#include ++//__FBSDID("$FreeBSD$"); + + /* tan(x) + * Return tangent function of x. + * + * kernel function: + * __kernel_tan ... tangent function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * \ No newline at end of file diff --git a/modules/fdlibm/src/e_rem_pio2.cpp b/modules/fdlibm/src/e_rem_pio2.cpp --- a/modules/fdlibm/src/e_rem_pio2.cpp +++ b/modules/fdlibm/src/e_rem_pio2.cpp @@ -8,28 +8,27 @@ * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== * * Optimized by Bruce D. Evans. */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* __ieee754_rem_pio2(x,y) * * return the remainder of x rem pi/2 in y[0]+y[1] * use __kernel_rem_pio2() */ #include -#include "math.h" #include "math_private.h" /* * invpio2: 53 bits of 2/pi * pio2_1: first 33 bit of pi/2 * pio2_1t: pi/2 - pio2_1 * pio2_2: second 33 bit of pi/2 * pio2_2t: pi/2 - (pio2_1+pio2_2) diff --git a/modules/fdlibm/src/k_cos.cpp b/modules/fdlibm/src/k_cos.cpp --- a/modules/fdlibm/src/k_cos.cpp +++ b/modules/fdlibm/src/k_cos.cpp @@ -6,18 +6,18 @@ * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* * __kernel_cos( x, y ) * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164 * Input x is assumed to be bounded by ~pi/4 in magnitude. * Input y is the tail of x. * * Algorithm @@ -48,17 +48,16 @@ * and tmp having the same precision as x. If they have extra * precision due to compiler bugs, then the extra precision is * only good provided it is retained in all terms of the final * expression for cos(). Retention happens in all cases tested * under FreeBSD, so don't pessimize things by forcibly clipping * any extra precision in w. */ -#include "math.h" #include "math_private.h" static const double one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */ C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ diff --git a/modules/fdlibm/src/k_rem_pio2.cpp b/modules/fdlibm/src/k_rem_pio2.cpp --- a/modules/fdlibm/src/k_rem_pio2.cpp +++ b/modules/fdlibm/src/k_rem_pio2.cpp @@ -6,18 +6,18 @@ * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* * __kernel_rem_pio2(x,y,e0,nx,prec) * double x[],y[]; int e0,nx,prec; * * __kernel_rem_pio2 return the last three digits of N with * y = x - N*pi/2 * so that |y| < pi/2. @@ -126,17 +126,16 @@ * The hexadecimal values are the intended ones for the following * constants. The decimal values may be used, provided that the * compiler will convert from decimal to binary accurately enough * to produce the hexadecimal values shown. */ #include -#include "math.h" #include "math_private.h" static const int init_jk[] = {3,4,4,6}; /* initial value for jk */ /* * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi * * integer array, contains the (24*i)-th to (24*i+23)-th diff --git a/modules/fdlibm/src/k_sin.cpp b/modules/fdlibm/src/k_sin.cpp --- a/modules/fdlibm/src/k_sin.cpp +++ b/modules/fdlibm/src/k_sin.cpp @@ -6,18 +6,18 @@ * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* __kernel_sin( x, y, iy) * kernel sin function on ~[-pi/4, pi/4] (except on -0), pi/4 ~ 0.7854 * Input x is assumed to be bounded by ~pi/4 in magnitude. * Input y is the tail of x. * Input iy indicates whether y is 0. (if iy=0, y assume to be 0). * * Algorithm @@ -39,17 +39,16 @@ * ~ sin(x) + (1-x*x/2)*y * For better accuracy, let * 3 2 2 2 2 * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6)))) * then 3 2 * sin(x) = x + (S1*x + (x *(r-y/2)+y)) */ -#include "math.h" #include "math_private.h" static const double half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ diff --git a/modules/fdlibm/src/k_tan.cpp b/modules/fdlibm/src/k_tan.cpp --- a/modules/fdlibm/src/k_tan.cpp +++ b/modules/fdlibm/src/k_tan.cpp @@ -6,18 +6,18 @@ * * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ /* INDENT OFF */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* __kernel_tan( x, y, k ) * kernel tan function on ~[-pi/4, pi/4] (except on -0), pi/4 ~ 0.7854 * Input x is assumed to be bounded by ~pi/4 in magnitude. * Input y is the tail of x. * Input k indicates whether tan (if k = 1) or -1/tan (if k = -1) is returned. * * Algorithm @@ -44,17 +44,16 @@ * 3 2 * tan(x+y) = x + (T1*x + (x *(r+y)+y)) * * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y)) * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) */ -#include "math.h" #include "math_private.h" static const double xxx[] = { 3.33333333333334091986e-01, /* 3FD55555, 55555563 */ 1.33333333333201242699e-01, /* 3FC11111, 1110FE7A */ 5.39682539762260521377e-02, /* 3FABA1BA, 1BB341FE */ 2.18694882948595424599e-02, /* 3F9664F4, 8406D637 */ 8.86323982359930005737e-03, /* 3F8226E3, E96E8493 */ 3.59207910759131235356e-03, /* 3F6D6D22, C9560328 */ diff --git a/modules/fdlibm/src/s_cos.cpp b/modules/fdlibm/src/s_cos.cpp --- a/modules/fdlibm/src/s_cos.cpp +++ b/modules/fdlibm/src/s_cos.cpp @@ -5,18 +5,18 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* cos(x) * Return cosine function of x. * * kernel function: * __kernel_sin ... sine function on [-pi/4,pi/4] * __kernel_cos ... cosine function on [-pi/4,pi/4] * __ieee754_rem_pio2 ... argument reduction routine @@ -41,17 +41,16 @@ * trig(NaN) is that NaN; * * Accuracy: * TRIG(x) returns trig(x) nearly rounded */ #include -#include "math.h" #define INLINE_REM_PIO2 #include "math_private.h" #include "e_rem_pio2.c" double cos(double x) { double y[2],z=0.0; @@ -78,12 +77,8 @@ cos(double x) case 0: return __kernel_cos(y[0],y[1]); case 1: return -__kernel_sin(y[0],y[1],1); case 2: return -__kernel_cos(y[0],y[1]); default: return __kernel_sin(y[0],y[1],1); } } } - -#if (LDBL_MANT_DIG == 53) -__weak_reference(cos, cosl); -#endif diff --git a/modules/fdlibm/src/s_sin.cpp b/modules/fdlibm/src/s_sin.cpp --- a/modules/fdlibm/src/s_sin.cpp +++ b/modules/fdlibm/src/s_sin.cpp @@ -5,18 +5,18 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* sin(x) * Return sine function of x. * * kernel function: * __kernel_sin ... sine function on [-pi/4,pi/4] * __kernel_cos ... cose function on [-pi/4,pi/4] * __ieee754_rem_pio2 ... argument reduction routine @@ -41,17 +41,16 @@ * trig(NaN) is that NaN; * * Accuracy: * TRIG(x) returns trig(x) nearly rounded */ #include -#include "math.h" #define INLINE_REM_PIO2 #include "math_private.h" #include "e_rem_pio2.c" double sin(double x) { double y[2],z=0.0; @@ -78,12 +77,8 @@ sin(double x) case 0: return __kernel_sin(y[0],y[1],1); case 1: return __kernel_cos(y[0],y[1]); case 2: return -__kernel_sin(y[0],y[1],1); default: return -__kernel_cos(y[0],y[1]); } } } - -#if (LDBL_MANT_DIG == 53) -__weak_reference(sin, sinl); -#endif diff --git a/modules/fdlibm/src/s_tan.cpp b/modules/fdlibm/src/s_tan.cpp --- a/modules/fdlibm/src/s_tan.cpp +++ b/modules/fdlibm/src/s_tan.cpp @@ -5,18 +5,18 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -#include -__FBSDID("$FreeBSD$"); +//#include +//__FBSDID("$FreeBSD$"); /* tan(x) * Return tangent function of x. * * kernel function: * __kernel_tan ... tangent function on [-pi/4,pi/4] * __ieee754_rem_pio2 ... argument reduction routine * @@ -40,17 +40,16 @@ * trig(NaN) is that NaN; * * Accuracy: * TRIG(x) returns trig(x) nearly rounded */ #include -#include "math.h" #define INLINE_REM_PIO2 #include "math_private.h" #include "e_rem_pio2.c" double tan(double x) { double y[2],z=0.0; @@ -72,12 +71,8 @@ tan(double x) /* argument reduction needed */ else { n = __ieee754_rem_pio2(x,y); return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even -1 -- n odd */ } } - -#if (LDBL_MANT_DIG == 53) -__weak_reference(tan, tanl); -#endif