| /* origin: FreeBSD /usr/src/lib/msun/src/s_sin.c */ |
| * ==================================================== |
| * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. |
| * Developed at SunPro, a Sun Microsystems, Inc. business. |
| * Permission to use, copy, modify, and distribute this |
| * software is freely granted, provided that this notice |
| * ==================================================== |
| void sincos(double x, double* sin, double* cos) { |
| /* if |x| < 2**-27 * sqrt(2) */ |
| /* raise inexact if x!=0 and underflow if subnormal */ |
| FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f : x + 0x1p120f); |
| /* sincos(Inf or NaN) is NaN */ |
| /* argument reduction needed */ |
| s = __sin(y[0], y[1], 1); |