From: Edipo Elder Fernandes de Melo <edipoelder@ig.com.br>
To: pgsql-sql@postgresql.org
Subject: Just comments about math
Date: Fri, 7 Dec 2001 15:34:51 -0200
Message-ID: <200112071734.fB7HYsm91502@postgresql.org> (raw)
Hi all,
Why the results below are different? (On my casio scientific calculator,
the two expressions below are equals to 381.4)
=# select (3+0.2*707/80)*80;
?column?
----------
381.4
=# SELECT 80*(3+(707/80)*0.2);
?column?
----------
368
Answer: "select 707/80;" returns 8, while "select 707/80::float" returns
8.8375.
Abracos,
Edipo Elder
[edipoelder@ig.com.br]
_________________________________________________________
Oi! Você quer um iG-mail gratuito?
Então clique aqui: http://registro.ig.com.br/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: edipoelder@ig.com.br
Subject: Re: Just comments about math
In-Reply-To: <200112071734.fB7HYsm91502@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox