W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[Bug 1794] Casting float/double to string

From: <bugzilla@wiggum.w3.org>
Date: Thu, 21 Jul 2005 17:43:49 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1Dvf5J-00055I-0u@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1794





------- Additional Comments From mike@saxonica.com  2005-07-21 17:43 -------
If the user does the computation 1.0 - 0.000000002, then the correct answer is
0.9999999998, and we must output it as 0.9999999998. We cannot distinguish this
case from a computation that produced 0.9999999998 as a result of
binary-to-decimal conversion "errors". 

If the user wants to round the result to a certain number of decimal places,
they have the means to do so, but we should never round the result without being
asked.

Michael Kay
Received on Thursday, 21 July 2005 17:43:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:25 UTC