< prev index next >

src/java.base/share/classes/java/lang/Double.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 299,309 **** d = Math.abs(d); if(d == 0.0) { answer.append("0.0p0"); } else { ! boolean subnormal = (d < DoubleConsts.MIN_NORMAL); // Isolate significand bits and OR in a high-order bit // so that the string representation has a known // length. long signifBits = (Double.doubleToLongBits(d) --- 299,309 ---- d = Math.abs(d); if(d == 0.0) { answer.append("0.0p0"); } else { ! boolean subnormal = (d < Double.MIN_NORMAL); // Isolate significand bits and OR in a high-order bit // so that the string representation has a known // length. long signifBits = (Double.doubleToLongBits(d)
*** 327,337 **** // If the value is subnormal, use the E_min exponent // value for double; otherwise, extract and report d's // exponent (the representation of a subnormal uses // E_min -1). answer.append(subnormal ? ! DoubleConsts.MIN_EXPONENT: Math.getExponent(d)); } return answer.toString(); } } --- 327,337 ---- // If the value is subnormal, use the E_min exponent // value for double; otherwise, extract and report d's // exponent (the representation of a subnormal uses // E_min -1). answer.append(subnormal ? ! Double.MIN_EXPONENT: Math.getExponent(d)); } return answer.toString(); } }
*** 572,582 **** * @return {@code true} if the argument is a finite * floating-point value, {@code false} otherwise. * @since 1.8 */ public static boolean isFinite(double d) { ! return Math.abs(d) <= DoubleConsts.MAX_VALUE; } /** * The value of the Double. * --- 572,582 ---- * @return {@code true} if the argument is a finite * floating-point value, {@code false} otherwise. * @since 1.8 */ public static boolean isFinite(double d) { ! return Math.abs(d) <= Double.MAX_VALUE; } /** * The value of the Double. *
< prev index next >