问题描述
我从来没有打电话使用浮点数,现在我想要b $ b想要,我不能!
* ** win32上的Python 2.5.1(r251:54863,2007年5月1日,17:47:05)[MSC v.1310 32
位(英特尔)]。 ***
0.29999999999999999
0.29999999999999999
曾经考虑过你的实际问题,以便人们可以提供帮助,让
独自查看档案,了解很多关于此事的帖子/>
主题?
问候,
Bj?
-
BOFH借口#66:
位桶溢出
... return(''%。8f''%fpnum).rstrip(''0'')
...
''0.3''
只是
str(0.3)
没什么!
感谢您指出。
I''ve never had any call to use floating point numbers and now that I
want to, I can''t!
*** Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32
bit (Intel)] on win32. ***
0.29999999999999999
0.29999999999999999
Ever considered phrasing your actual problem so one can help, let
alone looking at the archive for many, many postings about this
topic?
Regards,
Bj?rn
--
BOFH excuse #66:
bit bucket overflow
... return (''%.8f'' % fpnum).rstrip(''0'')
...
''0.3''
What''s wrong with just
str(0.3)
Nothing!
Thanks for pointing that out.
这篇关于浮点bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!