Mercurial > hg > truffle
comparison src/share/vm/runtime/sharedRuntimeTrig.cpp @ 17812:a7d4d4655766
Merge
author | kvn |
---|---|
date | Wed, 26 Mar 2014 18:21:05 -0700 |
parents | bdd155477289 |
children | 8a9bb7821e28 631c3a4ea10c |
comparison
equal
deleted
inserted
replaced
17789:6b207d038106 | 17812:a7d4d4655766 |
---|---|
656 C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */ | 656 C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */ |
657 C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ | 657 C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ |
658 | 658 |
659 static double __kernel_cos(double x, double y) | 659 static double __kernel_cos(double x, double y) |
660 { | 660 { |
661 double a,hz,z,r,qx; | 661 double a,h,z,r,qx; |
662 int ix; | 662 int ix; |
663 ix = __HI(x)&0x7fffffff; /* ix = |x|'s high word*/ | 663 ix = __HI(x)&0x7fffffff; /* ix = |x|'s high word*/ |
664 if(ix<0x3e400000) { /* if x < 2**27 */ | 664 if(ix<0x3e400000) { /* if x < 2**27 */ |
665 if(((int)x)==0) return one; /* generate inexact */ | 665 if(((int)x)==0) return one; /* generate inexact */ |
666 } | 666 } |
673 qx = 0.28125; | 673 qx = 0.28125; |
674 } else { | 674 } else { |
675 __HI(qx) = ix-0x00200000; /* x/4 */ | 675 __HI(qx) = ix-0x00200000; /* x/4 */ |
676 __LO(qx) = 0; | 676 __LO(qx) = 0; |
677 } | 677 } |
678 hz = 0.5*z-qx; | 678 h = 0.5*z-qx; |
679 a = one-qx; | 679 a = one-qx; |
680 return a - (hz - (z*r-x*y)); | 680 return a - (h - (z*r-x*y)); |
681 } | 681 } |
682 } | 682 } |
683 | 683 |
684 /* __kernel_tan( x, y, k ) | 684 /* __kernel_tan( x, y, k ) |
685 * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854 | 685 * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854 |