>? "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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement