Posted by William D McQuain on October 04, 2001 at 10:33:29:
In Reply to: Rounding Problem posted by Nitin Khanna on October 04, 2001 at 09:42:38:
: For my output, I'm getting the following:
: State tax 0.21
: Total 60.02
: The state tax for this input file is suppose to be .20 and the total 60.01 but the state tax is messing up the total since it's being added. Any idea's on how to fix this problem?
First, you've probably missed something in the specification regarding the state tax.
Second, if you're using doubles instead of ints you may be running into a numerical issue that can only be fixed (easily) by using ints.
Post a Followup