Re: [Fwd: Re: ruleutils with pretty-print option] - Mailing list pgsql-patches

From Tom Lane
Subject Re: [Fwd: Re: ruleutils with pretty-print option]
Date
Msg-id 1493.1059662752@sss.pgh.pa.us
Whole thread Raw
In response to Re: [Fwd: Re: ruleutils with pretty-print option]  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgsql-patches
Andreas Pflug <pgadmin@pse-consulting.de> writes:
> Well, to me it's not well-known that floating-point addition is not
> associative, do I need to re-learn my math?

regression=# select (1.0::float8 + (-1.0::float8)) + 1.0e-20::float8;
 ?column?
----------
    1e-20
(1 row)

regression=# select 1.0::float8 + ((-1.0::float8) + 1.0e-20::float8);
 ?column?
----------
        0
(1 row)


            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ruleutils with pretty-print option
Next
From: Bruce Momjian
Date:
Subject: Re: ruleutils with pretty-print option