Floating numbers
Grant Edwards
invalid at invalid.invalid
Thu Aug 12 17:20:18 EDT 2010
More information about the Python-list mailing list
Thu Aug 12 17:20:18 EDT 2010
- Previous message (by thread): Floating numbers
- Next message (by thread): Floating numbers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2010-08-12, Bradley Hintze <bradley.h at aggiemail.usu.edu> wrote: > Is there a way I can keep my floating point number as I typed it? No. > For example, I want 34.52 to be 34.52 and NOT 34.5200000002. You can't represent 34.52 using base-2 IEEE floating point (the HW floating point format used by pretty much all modern computers). 34.5200000002 is as close as you can get. When you enter a base-10 floating-point number, the computer will use the closest base-2 IEEE floating point number. Here are the nitty-gritty details: http://docs.sun.com/source/806-3568/ncg_goldberg.html Can you explain what your actual problem is? -- Grant Edwards grant.b.edwards Yow! I'm imagining a surfer at van filled with soy sauce! gmail.com
- Previous message (by thread): Floating numbers
- Next message (by thread): Floating numbers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list