Hacker News new | ask | show | jobs
by tyingq 1896 days ago
Their summary of Mysql 5.6 (https://0.30000000000000004.com/#mysql) isn't telling the whole story.

"SELECT .1 + .2;" does return 0.3

However,

  CREATE TABLE t1 (f FLOAT);
  INSERT INTO t1 VALUES(0.1),(0.2);
  SELECT SUM(f) FROM t1;
  // returns 0.30000000447034836
Which feels odd to me.

http://sqlfiddle.com/#!9/2e75e/3

1 comments

You're at 32-bit precision there.