Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET DECIMALS TO is used if SET FIXED is OFF ?
Message
 
 
À
21/11/2003 06:33:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00850956
Message ID:
00852428
Vues:
10
Fabio,

If you have 5 significant digits in your operands (ie 2.5567), it is incorrect to expect that calculated results should have more signifcant digits than the operands. When you multiply 3.1 * 2.5567 the actual result should only have 2 significant digits because it is controlled by the operand with the fewest significant digtis and the result should be 7.9. If you multiply 3.1000 * 2.5567 the result would have 5 significant digits 7.9258.


> ? 'into variable ', scanTotalWeight && i aspected 7 decimals
> ? 'SELECT ', selTotalWeight && i aspected 7 decimals
> ? 'SUM ', sumTotalWeight && i aspected 7 decimals
> ? 'CALCULATE ',calcTotalWeight && i aspected 7 decimals

> ? 'literal product ',3.1*2.5567 && i aspected 4 decimals
> ? 'literal division ',3.1/2.5567 && i wish full decimals
> ? 'variable division ',m.varDec1/m.varDec4 && i wish full decimals
> ? 'integer exponentation ',3.1^8 && i wish 8 decimals
> ? 'fractional exponentation ',3.1^2.5567 && i wish full decimals
> ? 'TRANSFORM INTEGER ',TRANSFORM(215.085*1000.0) && i aspected 4 decimals
> ? 'TRANSFORM DECIMAL ',TRANSFORM(215.085*1001.0) && i aspected 4 decimals
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform