Re: numeric and float converts to int differently?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: SZUCS 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 20:31:19
Message-ID: 20031028203119.GB14260@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Oct 28, 2003 at 21:16:53 +0100,
SZUCS Gábor <surrano(at)mailbox(dot)hu> wrote:
>
> As Tom pointed out, it isn't a floating point failure -- it is how rounding
> float is implemented. I assume anything with less than 15 digits can be
> exactly represented as float.

No. It has to be a dyadic number. For example .3 will not be represented
exactly by a float.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Browne 2003-10-28 23:11:13 Re: numeric and float converts to int differently?
Previous Message SZUCS Gábor 2003-10-28 20:16:53 Re: numeric and float converts to int differently?