Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sharedRuntimeTrig.cpp @ 14318:1020b892787b
Merge
author | hseigel |
---|---|
date | Sun, 02 Feb 2014 15:31:40 -0500 |
parents | 63a4eb8bcd23 |
children | 8a9bb7821e28 |
comparison
equal
deleted
inserted
replaced
14317:b59507f713e0 | 14318:1020b892787b |
---|---|
221 * | 221 * |
222 * iq[] integer array by breaking up q[] in 24-bits chunk. | 222 * iq[] integer array by breaking up q[] in 24-bits chunk. |
223 * | 223 * |
224 * fq[] final product of x*(2/pi) in fq[0],..,fq[jk] | 224 * fq[] final product of x*(2/pi) in fq[0],..,fq[jk] |
225 * | 225 * |
226 * ih integer. If >0 it indicats q[] is >= 0.5, hence | 226 * ih integer. If >0 it indicates q[] is >= 0.5, hence |
227 * it also indicates the *sign* of the result. | 227 * it also indicates the *sign* of the result. |
228 * | 228 * |
229 */ | 229 */ |
230 | 230 |
231 | 231 |
345 | 345 |
346 /* chop off zero terms */ | 346 /* chop off zero terms */ |
347 if(z==0.0) { | 347 if(z==0.0) { |
348 jz -= 1; q0 -= 24; | 348 jz -= 1; q0 -= 24; |
349 while(iq[jz]==0) { jz--; q0-=24;} | 349 while(iq[jz]==0) { jz--; q0-=24;} |
350 } else { /* break z into 24-bit if neccessary */ | 350 } else { /* break z into 24-bit if necessary */ |
351 z = scalbnA(z,-q0); | 351 z = scalbnA(z,-q0); |
352 if(z>=two24B) { | 352 if(z>=two24B) { |
353 fw = (double)((int)(twon24*z)); | 353 fw = (double)((int)(twon24*z)); |
354 iq[jz] = (int)(z-two24B*fw); | 354 iq[jz] = (int)(z-two24B*fw); |
355 jz += 1; q0 += 24; | 355 jz += 1; q0 += 24; |
407 } | 407 } |
408 | 408 |
409 | 409 |
410 /* | 410 /* |
411 * ==================================================== | 411 * ==================================================== |
412 * Copyright (c) 1993 Oracle and/or its affilates. All rights reserved. | 412 * Copyright (c) 1993 Oracle and/or its affiliates. All rights reserved. |
413 * | 413 * |
414 * Developed at SunPro, a Sun Microsystems, Inc. business. | 414 * Developed at SunPro, a Sun Microsystems, Inc. business. |
415 * Permission to use, copy, modify, and distribute this | 415 * Permission to use, copy, modify, and distribute this |
416 * software is freely granted, provided that this notice | 416 * software is freely granted, provided that this notice |
417 * is preserved. | 417 * is preserved. |