Re: [?] decimal rounding/truncating delimma
Posted in 1995
Jeffrey Sturm — — source: Informix-list mailing list archive (1991-1998)
cpilot (cpilot@teleport.com) wrote: [code sample deleted] : Running this program with Informix SE on AIX with an RS/6000 yeilds these : results: : subt = 1165.41 : subt2 = 984.60 : Can anyone explain this behavior to me. It appears that Informix rounds : when adding and truncates when subtracting. In the back of my mind ^^^^^^^^^^^^^^^^^^^^^^^^^^ Huh? I ran your example through 'bc': 1050 + 25 + 1050 * .0861 1165.4050 1050 + 25 - 1050 * .0861 984.5950 Looks like both are being correctly rounded up. : something tells me that this is the expected behavior, its just that : this conflicts with what the front of my mind tells me. Regards, -Jeff