| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| p0 = .1357884097877375669092680e8; |
| p1 = -.4942908100902844161158627e7; |
| p2 = .4401030535375266501944918e6; |
| p3 = -.1384727249982452873054457e5; |
| p4 = .1459688406665768722226959e3; |
| q0 = .8644558652922534429915149e7; |
| q1 = .4081792252343299749395779e6; |
| q2 = .9463096101538208180571257e4; |
| q3 = .1326534908786136358911494e3; |
| piu2 = .6366197723675813430755350e0; // 2/pi |
| sinus(arg double, quad int) double |
| var e, f, ysq, x, y, temp1, temp2 double; |
| x = x * piu2; /* underflow? */ |
| temp1,f = sys.modf(0.25*e); |
| temp1 = ((((p4*ysq+p3)*ysq+p2)*ysq+p1)*ysq+p0)*y; |
| temp2 = ((((ysq+q3)*ysq+q2)*ysq+q1)*ysq+q0); |