News for hackers. Stuff that matters.
Re:9999999999999999.0 – 9999999999999998.0 by thanatos_dem on Saturday January 05, 2019 @08:50PM (#18835830)
Interestingly, SQLite gets it wrong, returning 2.0, but MySQL, MariaDB, Postgres, and Cockroach all get it right at 1.0

I guess this comes down to most of them having implementations of arbitrary precision decimals.

Re:9999999999999999.0 – 9999999999999998.0 by zeroimpl on Sunday January 06, 2019 @07:30PM (#18841759)
In PostgreSQL, if you specify a decimal literal, it is assumed to be type NUMERIC (arbitrary precision) by default, as opposed to FLOAT or DOUBLE PRECISION.

If you stored your values in table rows as DOUBLE PRECISION, you would of course get the wrong answer.