Hi,

In short, problem can be described as it is caused by? the fact that
on certain condition represented by combination of large number of
invoices and over 9 digits totals Universe engine creates a small
fractional addition to total number.

Not quite right.

The problem here is that, just as there are numbers that cannot be represented accurately in decimal such as 1/3, there are numbers that cannot be represented accurately in the binary notiation used by the computer. As an easy example, the number 0.2 cannot be represented accurately and ends up as something like 0.20000000000000001 as a close approximation. Because IEEE floating point has a limited number of bits to store the matissa part of the value, the whole thing scales with bigger numbers. Essentially, a number cannot have lots of significant figures, wherever they may be in relation to the decimal point.

If you add up a large number of figures with these rounding errors they may accumulate to something significant. Even worse, if you decide to do decimal scaling with a simple multiply instead of an MD conversion code, the inaccuracies get scaled too.

This problem is not unique to UniVerse. It is a well known probelm of floating point numbers in computer systems. The usual fix in the multivalue world is to scale numbers (dollars to cents, for example) so that all our numbers are integers. UV also provides a set of character string arithmetic functions if you really want to get clever.


Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 -------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to