I have had problems with floats before, where the calculations were incorrect.  
Wrapping everything with val(number) or evaluate(number) sorted it all out for 
me.

It was all with calculations that the problems were caused though, returning 
incorrect numbers.

cheers
Martin 

>Interesting issue...
>
>I am extracting a price from an XML feed for insertion into our local data.
>The price is returned as a simple float value which I can output to screen
>just fine.  Unfortunately when I insert the info into the database it gets a
>little messed up.
>
>Here are 5 inserted values from a small test run...
>
>19.989999999999998
>15.99
>9.9900000000000002
>14.99
>39.990000000000002
>
>As you can see, 2 of them inserted fine but 3 of them got inserted with a
>0.000000000000002 margin of error.  Does anyone know why this is happening?
>
>FYI: This is going into MSSQL but I get the same problems with MySQL so I
>don't think it is a DB issue.
>
>--
>Jay
>
>-- 
>No virus found in this outgoing message.
>Checked by AVG Free Edition.
>Version: 7.1.405 / Virus Database: 268.10.9/417 - Release Date: 11/08/2006

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249708
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to