I seem to run into ColdFusion math problems with decimal numbers from time to time. For example, I would expect the following to return EQUAL but instead it returns NOT EQUAL (on CF 8.0.1):
<cfif 107407.40+12345.68+3703.70 IS 123456.78>EQUAL<cfelse>NOT EQUAL</cfif> I've fixed problems like this in the past with this: round(x*100)/100 I don't have confidence that will always work. Is there a better way to deal with this? I'm not looking forward to putting something like that in everywhere we do any computations with decimal numbers. Thanks, Brett The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list. To unsubscribe, send email to [email protected] For more options, visit http://groups.google.com/group/houcfug?hl=en -~----------~----~----~----~------~----~------~--~---
