MySQL Forums
Forum List  »  General

Floating point problem
Posted by: de Laitre Francois
Date: March 10, 2005 04:41AM

Hi,

I'm using mysql version 3.23 and I have the following problem :

> SELECT (1.57 + 0.42 - 1.57 - 0.42).
> Result : -0.00

The result is -0.1.10^-17. What can I do to have 0.00 and not -0.00 ?

In the documentation, they say that this problem cannot be solved using ROUND() or similar functions. I understand this problem but I don't know how to fix it.

Does someone know how to fix it, please ?

Thanks

Francois

Options: ReplyQuote


Subject
Written By
Posted
Floating point problem
March 10, 2005 04:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.