Re: BUG #4514: Pi division error

From: Rodriguez Fernando <rodriguez(at)ort(dot)edu(dot)uy>
To: Traci Sumpter <traci(dot)sumpter(at)opus(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4514: Pi division error
Date: 2008-11-06 12:28:51
Message-ID: 4912E303.20102@ort.edu.uy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Traci Sumpter escribió:
> The following bug has been logged online:
>
> Bug reference: 4514
> Logged by: Traci Sumpter
> Email address: traci(dot)sumpter(at)opus(dot)com(dot)au
> PostgreSQL version: 8.3.3
> Operating system: Linux
> Description: Pi division error
> Details:
>
> I am trying to do some calculations within Postgresql and am not getting the
> expected result. the first set proves that the pi works as expected with
> multiplication.
>
> Equation 180*pi
> VB 565.486677646163
> Calculator 565.486677646163
> PostgreSQL 565.486677646163
> Php 565.48667764616
>
> However if I extend this equation postgres definately fails this test.
>
> Equation (315-0)/180*pi
> VB 5.49778714378213
> Calculator 5.497787144
> PostgreSQL 3.14159265358979
> Php 5.4977871437821
>
> Help
>
>
hola el problema que entero/entero = entero
lo que debes hacer es

(315.0-0)/180*pi

saludos Fernando

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-11-06 13:41:34 Re: plperl & sort
Previous Message xtron 2008-11-06 12:05:23 BUG #4515: UPDATE strange behavior