>>? "Expected fails:",INT(10^(_DECIMALS-_ERRORPOWER)/4*_CICLES)
>>Could you explain to me how you calculated(which theory) the expected fails, thank you.
>
>Theory of Probability
>
>You have to compute this:
>- fixed a random IEEE number X = [0..1)
>- and a random error E = [-0.5 .. 0.5)*10^-_ERRORPOWER
>- X and E are indipendent
>- compute this probability:
>p(CARRY(X+X,DECIMALS)=1) Probability (X+X) have a carry at digit _DECIMALS
>
>
>The probability of fails is
>p(CARRY(X+X,_DECIMALS )=1,CARRY((X+E)+(X+E),_DECIMALS )=0)
>+
>p(CARRY(X+X,_DECIMALS )=0,CARRY((X+E)+(X+E),_DECIMALS )=1)
>
>Compute this for _ERRORPOWER=_DECIMALS,
>and you found 1/4.
>Then ....
>
>Fabio
?Probability (X+X) have a carry at digit _DECIMALS ,
I don't understand what carry means, can you give an example with a carry. Thanks