From d97d374947cfefc2a2577507e4ff47824977baaf Mon Sep 17 00:00:00 2001 From: Bruce Eckel Date: Sun, 7 Feb 2021 10:33:13 -0700 Subject: [PATCH] Update DoubleEquivalence.java --- operators/DoubleEquivalence.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operators/DoubleEquivalence.java b/operators/DoubleEquivalence.java index e0016038..5f06e25f 100644 --- a/operators/DoubleEquivalence.java +++ b/operators/DoubleEquivalence.java @@ -25,6 +25,7 @@ public class DoubleEquivalence { } public static void main(String[] args) { test(0, Double.MIN_VALUE); + System.out.println("------------------------"); test(Double.MAX_VALUE, Double.MAX_VALUE - Double.MIN_VALUE * 1_000_000); } @@ -37,6 +38,7 @@ new Double(): 0.000000e+00==4.900000e-324 false false Double.valueOf(): 0.000000e+00==4.900000e-324 false false +------------------------ 1.797693e+308==1.797693e+308 true Automatic: 1.797693e+308==1.797693e+308 false true