且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

处理数量小,准确度高

更新时间:2023-02-26 19:01:24

您的数字真的在10 ^ 308(最小标准化双)和10 ^ -324(最小可表示双,非正规化,即丢失精度)?如果是这样,那么通过缩放它们,你可以通过解决双重类型的指数范围的限制来确实获得准确性。

Are your numbers really in the region between 10^-308 (smallest normalized double) and 10^-324 (smallest representable double, denormalized i.e. losing precision)? If so, then by scaling them up you do indeed gain accuracy by working around the limits of the exponent range of the double type.

我不得不怀疑:什么样的的应用程序处理数字非常小?我知道没有任何需要这样的物理纪律。

I have to wonder though: what kind of application deals with numbers that extremely small? I know of no physical discipline that needs anything like that.