package cn.edu.bjut.chapter2; public class DoubleTester { public static void main(String[] args) { double d = 0.0 / 0.0; System.out.println(d); double a = 2.0; double b = 1.91; double c = 0.09; System.out.println(a - b == c); System.out.println(a - b); System.out.println(Math.abs(a - b - c) < 1E-6); } }