/****************************************************************************** * This program demonstrates floating point underflow. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ import org.pureprogrammer.Utils; public class FloatingPointUnderflow { public static void main(String[] args) { double smallFloat = 1e-308; System.out.println(Utils.join("", "Small float: ", smallFloat)); smallFloat /= 1e12; System.out.println(Utils.join("", "Smaller float: ", smallFloat)); smallFloat /= 1e12; System.out.println(Utils.join("", "Smallest float: ", smallFloat)); } }