如何在ColdFusion中将科学计数法转换为十进制? [英] How can I convert scientific notation to decimal in ColdFusion?

查看:124
本文介绍了如何在ColdFusion中将科学计数法转换为十进制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用科学计数法表示为1E-05的数字。我想通过ColdFusion将这个值显示为0.00001。我该怎么做?

I have a number that is represented in scientific notation as 1E-05. I would like to display this value, via ColdFusion, as 0.00001. How do I do that?

推荐答案

还值得注意的是:您可以将任何有效数字传递给 PrecisionEvaluate( )

因此,如果您将科学计数法和常规数混合使用,则可以将它们全部包装在PrecisionEvaluate()中。

Also worth noting: you can pass any valid number to PrecisionEvaluate().
So, if you have a mix of scientific notation and regular numbers, you are safe to just wrap them all in PrecisionEvaluate().

示例:

PrecisionEvaluate('1E-05') // 0.00001  
PrecisionEvaluate('1E-06') // 0.000001  
PrecisionEvaluate('10') // 10  
PrecisionEvaluate('11.35000') // 11.35000

ColdFusion 10个文档( http://help.adobe.com/zh_CN/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fd9.html

ColdFusion 10 docs (http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fd9.html)

这篇关于如何在ColdFusion中将科学计数法转换为十进制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆