Of Haikal Saadh
Sent: Monday, 13 August 2007 12:19 PM
To: cfaussie@googlegroups.com mailto:cfaussie@googlegroups.com
Subject: [cfaussie] Re: Strange FIX() behaviour
I remember a thread from here a while back discussing the various
idiosyncrasies of floating point
I would have thought from a decimal though. Looks like it is VERY literal
_
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of grant
Sent: Monday, 13 August 2007 11:38 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Strange FIX() behaviour
it seems
Something odd is happening there
If you do this:
cfset cents = 995
cfoutput
#FIX(cents)#
/cfoutput
you get the expected result. eg: 995
The only thing that springs to mind is that maybe:
9.95 * 100 = 994. ?
not sure how to prove this theory tho...
Steve Onnis wrote:
Has anyone
I remember a thread from here a while back discussing the various
idiosyncrasies of floating point arithmetic, and that you should be
really storing money in cent amounts.
I've got no first hand experience in this, but have a flip thru the
archives.
David Harris wrote:
Something odd is
Steve use Ceiling(number) instead, much better than Fix()
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Onnis
Sent: Monday, 13 August
have changed it from FIX() to ROUND() anyway
Steve
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Haikal Saadh
Sent: Monday, 13 August 2007 12:19 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Strange FIX() behaviour
I remember
PROTECTED] On
Behalf
Of Haikal Saadh
Sent: Monday, 13 August 2007 12:19 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Strange FIX() behaviour
I remember a thread from here a while back discussing the various
idiosyncrasies of floating point arithmetic, and that you should be really
mailto:cfaussie@googlegroups.com
[mailto: cfaussie@googlegroups.com
mailto:cfaussie@googlegroups.com] On Behalf
Of Haikal Saadh
Sent: Monday, 13 August 2007 12:19 PM
To: cfaussie@googlegroups.com mailto:cfaussie@googlegroups.com
Subject: [cfaussie] Re: Strange FIX() behaviour