// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class FloatSucks {
    public static void main(String[] args) {
        for(int i = 1; i <= 12; i++) {
            String s = "100000000000".substring(0, i);
            String s1 = s + ".0";
            String s2 = s + ".1";
            System.out.println(s1 + " = " + s2 + " : " + s1.equals(s2) + " " + (Float.parseFloat(s1) == Float.parseFloat(s2)));
        }
    }
}
