Comment

Comment by murkle

Article says 1,056,964,609 / 1,056,964,610

Quick Java program says 1,065,353,216 / 1,065,353,217

Which one is right? Or are Java floats just "different"?

  static {
    float a = 0;
    long count = 0;
    while (a < 1) {
      count++;
      a = Math.nextAfter(a, 2);
    }
    System.out.println("count = " + count);
  }
parent murkle 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton