I just discovered a weird bug in CFMX 6.0's arithmetic functions.

I'm adding a checksum to a form.  Its a simple function, I concatenate
two numbers separated by a decimal, encrypt then urlencode it.  On the
subsequent page it decodes then decrypts the string.  This part works
fine.  However, when I subtract the integer portion (number 1) to leave
the decimal part (number 2) I get the wrong number.

Original string: 123.123
Number 1: 123
Number 2: 0.100000000093

Here's the command I use:

Evaluate(Val(#DecryptedData#) - Fix(Val(#DecryptedData#)))

DecryptedData is the decrypted and decoded value, i.e. 123.123.  It
takes this number and subtracts the integer portion (using the Fix
function).

Any idea what I'm doing wrong?
--
Damien McKenna - Web Developer - [EMAIL PROTECTED]
The Limu Company - http://www.thelimucompany.com/ - 407-804-1014
"Nothing endures but change." - Heraclitus
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to