Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00044419
Message ID:
00044597
Vues:
39
>>Do all your calculations with the same precision.
>>
>>Vlad
>>
>>>I have a financial type app and parts of it use calculations that
>>>cause values in fractional cents. For example, the result of one
>>>calculation may cause a value of 3.5835 while another will be
>>>3.5888. This can cause rounding errors when reporting the data
>>>in dollars and cents.
>>>
>>>How do things like SBT accounting systems handle these issues?
>
>This is one of the reasons there is the 'Currency' type data - it defaults to 4 decimal places so that this kind of rounding problem is eliminated.
>
>Barbara

Ok, so how do I do all calcs with the same precision? The currency
data type always returns things out to 4 decimals, but I have not
seen a fractional penny as of late. How do I keep all answers to be
at no more precision than pennies - with ROUND()? Why do I want
currency to be at four digits? Can I change it to only 2 to eliminate
the issue?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform