Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Rounding Errors in DBISAM
Tue, Mar 25 2008 11:45 PMPermanent Link

Phil Read
I have read through all the previous posts on rounding errors...

Tried changing my databases Currency fields all to BCD and then changing
all parts in the code to use the Currency type...

Still getting rounding errors, anyone have this problem? Funny this is I
had a client using DBISAM build 4.26 who had a rounding error of 0.01
cent, and when I tried his data on my PC using 4.26 the problem was not
there, so I upgraded his DBISAM version and his problem went away. Has
something changed in 4.26 that would effect rounding?

Anyway my current rounding problem is in 4.26 so anyone who can help I
would really appreciate it.

Thanks
Wed, Mar 26 2008 7:25 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Phil,

<< Still getting rounding errors, anyone have this problem? Funny this is I
had a client using DBISAM build 4.26 who had a rounding error of 0.01 cent,
and when I tried his data on my PC using 4.26 the problem was not there, so
I upgraded his DBISAM version and his problem went away. Has something
changed in 4.26 that would effect rounding? >>

No.  Did you try the exact same operation with the exact same data on your
machine ?  Is it possible that you've still got some floating-point
calculations involved somewhere in your code ?  Usually, this type of issue
is related to there still being an implicit cast to a float during a
function call or multiplication/division that ends up producing a
floating-point result.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image