Just tried in CF.  It gives the "correct" answer.


Jim Davis wrote:
>>-----Original Message-----
>>From: Ray Champagne [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, June 08, 2005 5:05 PM
>>To: CF-Community
>>Subject: Re: stupid Javascript question
>>
>>Yep, this worked:
>>
>>var price = 3 * 12.95;
>>document.write(price.toFixed(2));
>>
>>Thanks, I was scouring the web trying to figure that out.  I would have
>>been here a while.  :)
> 
> 
> You might want to test it out just to be safe tho' - I'm not sure what the
> browser cut-off point for JS 1.3 is... since the language is now up to 1.5 I
> think it's anything from the past few years, but I could be wrong.
> 
> 
> 
>>That seems kinda convoluted if you ask me.  I guess if I studied the
>>specifics, it would make more sense.  Nothing like little problems like
>>this to stress you out under deadline and client pressure!
> 
> 
> Well - it IS convoluted - but it's the way that almost all computers do
> math.  ;^)
> 
> I believe (but am not sure) that the exact same thing happens in many
> languages, including Java and C++ (at least when you're multiplying
> floats)... I wonder what answer CFMX will give you...
> 
> Jim Davis
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:160050
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to