Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Minus Zero
Message
De
04/02/2005 18:49:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00983821
Message ID:
00984070
Vues:
23
>? "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
Fil
Voir

Click here to load this message in the networking platform