# test parsing of floats, requiring double-precision# very large integer part with a very negative exponent should cancel outprint(float('9' * 400 + 'e-100'))print(float('9' * 400 + 'e-200'))print(float('9' * 400 + 'e-400'))# many fractional digitsprint(float('.' + '9' * 400))print(float('.' + '9' * 400 + 'e100'))print(float('.' + '9' * 400 + 'e-100'))# tiny fraction with large exponentprint('%.14e' % float('.' + '0' * 400 + '9e100'))print('%.14e' % float('.' + '0' * 400 + '9e200'))print('%.14e' % float('.' + '0' * 400 + '9e400'))# ensure that accuracy is retained when value is close to a subnormalprint(float('1.00000000000000000000e-307'))print(float('10.0000000000000000000e-308'))print(float('100.000000000000000000e-309'))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。