Add temporary check for rare test failure.

This commit is contained in:
Thomas Neidhart 2015-01-21 00:42:16 +01:00
parent 4e1958256e
commit 15bdcc3be2
1 changed files with 5 additions and 1 deletions

View File

@ -876,7 +876,11 @@ public class FastMath {
if (x < 0.0) {
intVal = (int) -x;
if (intVal > 746) {
// TEMP: special handling of negative_infinity
// the above might fail in non-reproducible ways with Sun JDK 1.5,
// most likely due to a bug in the JIT. Add a safe-guard for very
// negative numbers.
if (intVal > 746 || x < Integer.MIN_VALUE) {
if (hiPrec != null) {
hiPrec[0] = 0.0;
hiPrec[1] = 0.0;