News for hackers. Stuff that matters.
Re:What every computer programmer should know about floating... by wtallis on Monday September 15, 2014 @11:12PM (#8322849)
If your machine uses 80-bit floating point, then those extended-precision floats can exactly represent any 64-bit integer, provided that your language's standard library/runtime correctly converts without an intermediate step using 64-bit floats (53-bit mantissa).
Re:What every computer programmer should know about floating... by saitohm on Wednesday September 17, 2014 @07:30AM (#8329471)
Yes. You can see the compatibility between 80-bit floating points (long double in C) and 64-bit integer (long long int) with a code like this:

  long double x0,x1,y0,y1;
  x0 = 18446744073709551615.0L; /* 2^64 - 1 */
  x1 = 18446744073709551616.0L; /* 2^64     */

  y0 = x0 + 1.0L;
  y1 = x1 + 1.0L;

  printf("%d\n", x0 == y0); /* false (with enough precision) */
  printf("%d\n", x1 == y1); /* true  (precision being lost ) */
Re:What every computer programmer should know about floating... by jevinskie on Tuesday September 16, 2014 @12:06AM (#8322970)
Sometimes called 'long double' by the compiler.