Page 1 of 1

Calculation bug?

Posted: Fri May 09, 2003 5:07 pm
by manfai
I am trying to print checks, but when I create the check amount with a pre-calculated total field. However when creating the cents on the amount; it is sometime off by one cent. The num total show on the check is correct, but the amount which created by the spellnum figure on the check is no good. The formula that I use is ____"*** " + UPPER(SPELLNUM(InvTotal))+ IIF((InvTotal - INT(InvTotal)) <> 0, " AND " + STR((InvTotal - INT(InvTotal)) * 100, 2,0) + "/100", "") + " DOLLARS ***"____where InvTotal = 726.00 and the result come out as 725.99.____I am using a Althon XP 1800 system with 512mb DDR Ram. Is that one of the problem where Althon^s Floating Point Unit is not the same as Intel^s???____and in another test show all "********************" character.____Please let me know if anyone have the same problem and how you could fix it.____Thank you.____Garrett____My email is manfai@yahoo.com

=> RE: Calculation bug?

Posted: Sat May 10, 2003 6:59 am
by kfleming
Try adding the ROUND() function around all of your numeric values in this calc and see if it corrects things.____Kathleen__R&R Support

==> RE: Calculation bug?

Posted: Mon May 12, 2003 11:19 am
by manfai
>Try adding the ROUND() function around all of your numeric __>values in this calc and see if it corrects things. __>__>Kathleen __>R&R Support ________Thanks Kathleen. It is working, but do you have any idea why this will happend. Is it because Althon^s FPU not as good as Intel^s or else?____

===> RE: Calculation bug?

Posted: Mon May 12, 2003 1:17 pm
by kfleming
There is an article on our tech notes page that has lots of info on rounding and why you should always do it.____Kathleen__R&R Support