Re: Floating point type to store numbers

From: "Radhika Sambamurti" <radhika(at)88thstreet(dot)com>
To: "Milen A(dot) Radev" <milen(at)radev(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Floating point type to store numbers
Date: 2007-04-17 20:36:20
Message-ID: 20944.63.118.86.10.1176842180.squirrel@www.88thstreet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I believe the manual is quite clear on that one (
> http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-FLOAT)
> :
>
> " - If you require exact storage and calculations (such as for monetary
> amounts), use the numeric type instead."
>
>
> So if you decide to use floats after this warning you are on your own.
>
>
> --
> Milen A. Radev

Well, actually the manual is not quite clear on this one.
It says quite clearly that very very small values approaching zero and
very very large values will be problematic. But I am not calculating the
distance to the moon. I need values to be accurate upto the 6th decimal
place, and was wondering if people use floating point types for this sort
of thing.

Thanks,
Radhika

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2007-04-17 20:53:18 Re: Floating point type to store numbers
Previous Message Radhika Sambamurti 2007-04-17 20:33:33 Re: Floating point type to store numbers