处理数量小,准确度高 [英] Dealing with small numbers and accuracy

查看:104
本文介绍了处理数量小,准确度高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序,处理很多很少的数字(朝向双限制的下限)。

I have a program where I deal with a lot of very small numbers (towards the lower end of the Double limits).

在执行我的应用程序期间,这些数字中的一些逐渐变小意味着他们的估计不太准确。

During the execution of my application, some of these numbers progressively get smaller meaning their "estimation" is less accurate.

我的解决方案是在进行任何计算之前将其缩放,然后将其缩放再次下来?

My solution at the moment is scaling them up before I do any calculations and then scaling them back down again?

...但是让我想起来,我是否真的通过这样做获得更多的准确性?

...but it's got me thinking, am I actually gaining any more "accuracy" by doing this?

想法?

推荐答案

您的数字真的在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.

这篇关于处理数量小,准确度高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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