English 中文(简体)
多样化
原标题:Divide Underflow

为什么只有在分歧者比红利小得多的情况下才造成支离破碎,无论红利大小,在排雷人员接近零时,是否会出现分裂?

最佳回答

From http://www.strw.leidenuniv.nl/docs/intel/f_ug/ieee_ovw.htm

The underflow exception occurs if the rounded result has an exponent that is too small to be represented using the floating-point format of the result.

这意味着,如果红利和二分母的比例小到足以超过浮动点格式的精确性,而不是对诸如ep等特定价值的任何依赖,就会出现错误。

由于排雷员在假定非零计算器时将采用零方法,因此,划分的结果将接近尾声。 由于计算器采用零方法,假定非零化物,结果为零。 当这一价值小到小时,就会发生。

如果计算器和排雷器的价值非常接近,即使其数量非常小,你也可以取得有益的结果,那么一个很小的计算器不一定会造成流入。

<<>Example>>:

在C#, epsilon为1.401298E-45。

epsilon/epsilon == 1.0f

尽管计算器非常小,但结果仍然有效。

现在,如果你要尝试这样的东西:

float max = 3.40282347E+38f;

/// underflow, denominator will be 0.0f
float denominator = epsilon / max; 

<代码>denominator将有1e-83号令。 由于83个远超过最大单方位位位值,这一数值将降至零。 也就是说,流入的就是流入者。

/// generates a divide-by-zero error.
float result = 10 / denominator; 

这产生一种逐个零而不是限定性,因为储存在<条码>登ominator中的中间结果首先被搁置到0,然后在第二次操作中使用。

您能否获得资金不足或按零分配,取决于汇编者、您的使用和上级命令等。

例如,在C#:

10f / float.Epsilon / float.MaxValue

以及

(10f / float.Epsilon) / float.MaxValue

20971522.0f。

然而,数学等值表述:

10f / (float.Epsilon / float.MaxValue)

无限。

问题回答

暂无回答




相关问题
What are the differences between NP, NP-Complete and NP-Hard?

What are the differences between NP, NP-Complete and NP-Hard? I am aware of many resources all over the web. I d like to read your explanations, and the reason is they might be different from what s ...

Implementation Detail for Graph Analysis Algorithms

Let s say I have a graph with "heavy" nodes, that is each node is an object that is already carrying a lot of data. I want to do a graph transformation that requires me to calculate a special ...

Worst case running time (Big O)

I have this question, and I don t know how to solve it, because I don t understand it. :( The question is: Programs A and B are analyzed and are found to have worst case running times no ...

RSA cryptosystem

Hi i am trying to set up an RSA cryptosystem i have all the values except d selected prime numbers: p=1889, q=2003, n=3783667, phi=3779776, e= 61 i got stuck finding d could anyone help me to figure ...

BNF Grammar Derivation

I want to apply rules of BNF Grammar to produce derivation for : a_Num

热门标签