Re: numeric and float converts to int differently?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: SZÛCS Gábor <surrano(at)mailbox(dot)hu>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: numeric and float converts to int differently?
Date: 2003-10-28 18:21:17
Message-ID: 87brs1gr4y.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


"SZÛCS Gábor" <surrano(at)mailbox(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message SZUCS Gábor 2003-10-28 20:16:53 Re: numeric and float converts to int differently?
Previous Message SZUCS Gábor 2003-10-28 17:02:14 Re: URGENT!!! changing Column size