Renaud Diez wrote:
> The following bug has been logged online:
>
> Bug reference: 3959
> Logged by: Renaud Diez
> Email address: rdiez@salesprize.com
> PostgreSQL version: 8.2
> Operating system: Debian
> Description: Huge calculation error
> Details:
>
> the basic mathematical expression like the following one doesn't compute the
> correct result:
>
>> select 100*(1+(21/100));
>
> return a result of 100 instead of 121.
That's because 21/100 = 0, in integer math. Try "SELECT
100*(1+(21/100.0))" to use floating points.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com