Page 1 of 1

rounding error

Posted: Thu Oct 26, 2006 12:15 pm
by DominikH
Hello,

I have a small problem regarding the "internal rounding" of Vensim (I´m using Vensim DDS32 Version 5.1a).
It seems like Vensim is rounding up to the next integer or eighth before summing up values and after divisions.

Example:

Summing up
87096,97656
10935,94238
8006,67334
6118,92041
1246843,875
134190,3594
88142,71094
38537,73438
52883,94922
2814,79126
3497,164795
2473,604248

in Vensim is: 1681542,625
in Excel is: 1681542,702

and additionally:
dividing: 132244368 by 68 yields 1944770,125
in Excel the same calculation yields 1944770,118

In my model is is essential to be as exact as possible, so using Integer() does not help.

Thanks in advance for your help :-)

DominikH

P.S.: I´m only using the functions (Sum[subscript!]) and elmcount(subscript) (that´s the "68" in the example above) to "construct" this type of error. The Variable Type is "Auxiliary-Normal".

Posted: Thu Oct 26, 2006 1:26 pm
by bob@vensim.com
You can switch to the double precision version of Vensim and it will give more significant digits on internal computations. There may still be an issue in sending data in and getting it out as this is done with single precision which only supports about 5 to 6 significant digits.

Posted: Thu Oct 26, 2006 1:37 pm
by DominikH
Thanks a lot.

By the time I installed Vensim I had no idea what the other installation modes were, so I´m going to check this :-)