/* origin: FreeBSD /usr/src/lib/msun/src/k_sinf.c */1/*2* Conversion to float by Ian Lance Taylor, Cygnus Support, [email protected].3* Optimized by Bruce D. Evans.4*/5/*6* ====================================================7* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.8*9* Developed at SunPro, a Sun Microsystems, Inc. business.10* Permission to use, copy, modify, and distribute this11* software is freely granted, provided that this notice12* is preserved.13* ====================================================14*/1516#include "libm.h"1718/* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */19static const double20S1 = -0x15555554cbac77.0p-55, /* -0.166666666416265235595 */21S2 = 0x111110896efbb2.0p-59, /* 0.0083333293858894631756 */22S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */23S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */2425float __sindf(double x)26{27double_t r, s, w, z;2829/* Try to optimize for parallel evaluation as in __tandf.c. */30z = x*x;31w = z*z;32r = S3 + z*S4;33s = z*x;34return (x + s*(S1 + z*S2)) + s*w*r;35}363738