Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi中如何从格式化浮点中删除指数_Delphi - Fatal编程技术网

Delphi中如何从格式化浮点中删除指数

Delphi中如何从格式化浮点中删除指数,delphi,Delphi,给定一个双精度值,如1.00500000274996E-8,我如何将其转换为小数点后最大位数的非科学格式?在这种情况下,8位数为1.00500000 转换不应该用零填充,因此2007将显示为2007,2012.33和2012.33 我尝试了很多使用Format、FormatFloat、FloatToStrF的组合,但似乎都没有中大奖。非常感谢你的帮助 编辑:我应该澄清一下,我正在尝试将其转换为字符串表示,而不使用指数(E)部分。请参阅CodeCentral中的John Herbster。也许不完

给定一个双精度值,如1.00500000274996E-8,我如何将其转换为小数点后最大位数的非科学格式?在这种情况下,8位数为1.00500000

转换不应该用零填充,因此2007将显示为2007,2012.33和2012.33

我尝试了很多使用Format、FormatFloat、FloatToStrF的组合,但似乎都没有中大奖。非常感谢你的帮助

编辑:我应该澄清一下,我正在尝试将其转换为字符串表示,而不使用指数(E)部分。

请参阅CodeCentral中的John Herbster。也许不完全是你想要的,但可能是一个很好的起点。。。抄送项目说明:

This module includes
(a) functions for converting a floating binary point number to its *exact* decimal representation in an AnsiString;
(b) functions for parsing the floating point types into sign, exponent, and mantissa; and
(c) function for analyzing a extended float number into its type (zero, normal, infinity, etc.)

Its intended use is for trouble shooting problems with floating point numbers.
他的套路可能也很有趣。

FormatFloat('0

输出为:00000000100500000274996


它不会输出超过绝对需要的数字。

请原谅,这是正确的。是的。