Raised This Month: $ Target: $400
 0% 

Float to string precision


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
commonbullet
Veteran Member
Join Date: Oct 2005
Old 04-05-2007 , 21:51   Float to string precision
Reply With Quote #1

I don't know if that's a bug or if it's the expected behavior.

Code:
new fstr[15]    float_to_str(1234.2, fstr, 14)

In this example the string value is 1234.199951

Code:
format(fstr, 14, "%f", 1234.2)
Results in the same stuff...

Last edited by commonbullet; 04-06-2007 at 01:59.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode