From: Greg Stark <gsstark@mit.edu>
To: SZÛCS Gábor <surrano@mailbox.hu>
Cc: pgsql-sql@postgresql.org
Subject: Re: numeric and float converts to int differently?
Date: 28 Oct 2003 13:21:17 -0500
Message-ID: <87brs1gr4y.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <074b01c39d72$6f512f90$0403a8c0@fejleszt4>
References: <072c01c39d65$65f83950$0403a8c0@fejleszt4>
<20031028154536.GA29427@it.is.rice.edu>
<074b01c39d72$6f512f90$0403a8c0@fejleszt4>
"SZÛCS Gábor" <surrano@mailbox.hu> writes:
> > cannot see is that the float values are not actually exactly 0.5
>
> Yes I could guess that (floating point vs fixed), but is this a coincidence
> that both '0.5'::float and '-0.5'::float are closer to 0, whereas they could
> be closer to +/-1, as well as both closer to the lower or upper bound.
Wouldn't 0.5 and -0.5 be representable exactly as floats?
--
greg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gsstark@mit.edu, surrano@mailbox.hu
Subject: Re: numeric and float converts to int differently?
In-Reply-To: <87brs1gr4y.fsf@stark.dyndns.tv>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox