[Python-Dev] Expert floats (original) (raw)
Simon Percivall s.percivall at chello.se
Tue Apr 6 09:12:22 EDT 2004
- Previous message: [Python-Dev] Expert floats
- Next message: [Python-Dev] Expert floats
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2004-04-06, at 14.46, Ka-Ping Yee wrote:
I think we have made progress. Now we can set aside the red-herring issue of platform-independent serialization and focus on the real issue: human-readable string representation. [Snip] I am tired of making excuses for Python. I love to tell people about Python and show them what it can do for them. But this floating-point problem is embarrassing. People are confused because no other system they've seen behaves like this. Other languages don't print their numbers like this. Accounting programs and spreadsheets don't print their numbers like this. Matlab and Maple and Mathematica don't print their numbers like this. Only Python insists on being this ugly. And it screws up the most common way that people first get to know Python -- as a handy interactive calculator.
So how should "2.2 - 1.2 - 1" be represented?
Matlab (Solaris 9): 2.22044604925031e-16 Octave (MacOS X 10.3): 2.22044604925031e-16 Python 2.3.3 (MacOS X 10.3): 2.2204460492503131e-16
Is this something you accept since Matlab does it?
- Previous message: [Python-Dev] Expert floats
- Next message: [Python-Dev] Expert floats
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]