Rounding issue in TBCDField
From: Stephan St-Denis (stephans_at_progicielsconcept.com)
Date: 12/02/03
- Next message: Iman L Crawford: "Re: Rounding issue in TBCDField"
- Previous message: Fabio Dell'Aria: "Re: Strange Access violation error"
- Next in thread: Iman L Crawford: "Re: Rounding issue in TBCDField"
- Reply: Iman L Crawford: "Re: Rounding issue in TBCDField"
- Reply: Scott: "Re: Rounding issue in TBCDField"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Dec 2003 11:56:56 -0500
Hi,
I'm facing a problem with a rounding issue that I don't know how to fix.
I have a variable (Currency type) that holds a value of 68.135. When I
assign this value to a TBCDField with Size = 2 (number of decimals after dec
point), the field contains 68.14.
I always thought that if a number ends with a 5 an the next digit was either
a zero or missing, the value would be rounded without adding .01 thus giving
68.13 and not 68.14.
What should I do to get the right result ? Maybe am I wrong and the correct
result should be 68.14 ?
Thanks,
Stephan
- Next message: Iman L Crawford: "Re: Rounding issue in TBCDField"
- Previous message: Fabio Dell'Aria: "Re: Strange Access violation error"
- Next in thread: Iman L Crawford: "Re: Rounding issue in TBCDField"
- Reply: Iman L Crawford: "Re: Rounding issue in TBCDField"
- Reply: Scott: "Re: Rounding issue in TBCDField"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|