the calculator

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

Post Reply
lemon535
Forum Regular
Posts:103
Joined:Tue Jul 25, 2006 3:50 am
the calculator

Post by lemon535 » Tue Aug 22, 2006 6:19 am

i was using the calculator in dhpos and i done the following equation...

217.30
-
216.40

now the answer is obviously .90 i honestly didnt need the calc for that! but the answer i got was like .90000003

User avatar
Dale Harris
Forum Owner
Posts:1171
Joined:Sun Dec 28, 2003 10:19 pm
Location:Chicago
Contact:

Rounding

Post by Dale Harris » Tue Aug 22, 2006 8:56 am

lemon535,

Yep, that is just the way BASIC does floating point math. I can correct for that when calulating the money because I know the rounding factor you have set for currency, but the calculator does not know if you are doing math with money so I have to let the floating point rounding errror go through.

However the rounding error is usually a really tiny amount so I am sure that it you get an answer like 256.2199999999998 that you can figure out that the real answer is 256.22
Dale

Post Reply

Who is online

Users browsing this forum: No registered users and 282 guests