PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> -- judgement: s1 = s2 + s3, However, s2 is not correctly computed
[ shrug... ] If you are expecting exact results, don't use
floating-point arithmetic (ie, use "numeric" not "double precision").
This example, which will result in adding values of enormously
different magnitudes in various orders, is tailor-made to
exhibit roundoff error.
https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-FLOAT
regards, tom lane