>Hi,
>
>I am interesting in what is the best practice to deal with VFP rounding in calculation proble.
>
>error 1. ? 550000.815*1.00*1.00*1.00*1.00 wrong result
>error 2. Round() bug.
>
>Do you round every number and then perform calculations but that we come back to error 1.
>Or you do calculus and then round (with some good round routine).
No computer in the world is able to calculate decimal numbers accurately because digital is all about integers. When a computer converts a decimal number to digital, it must decide which of many different standards it must follow. Every standard has it trade offs, so it's a tough decision, and somebody will always complain.
The ONLY way to calculate decimal numbers correctly via a computer is to convert the decimal numbers to integers during the calculations, and then converting it back to decimals again after the calculations. But using this method you must make risk reaching the upper limit of integer calculations of the computer.
So it's always a choice, no single choice is perfect.