Raised This Month: $ Target: $400
 0% 

str_to_float() glitchs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-22-2009 , 16:14   str_to_float() glitchs
Reply With Quote #1

When i am using str_to_float, then my 0.5 becoes 4.999999 (on linux, on widnows fine, looks random for me), but when i am using same code on windows it becomes 0.500000 :\

Quote:
Linux:
string'd - 0.1 | | float'd - 0.100000
string'd - 0.2 | | float'd - 0.200000
string'd - 0.3 | | float'd - 0.300000
string'd - 0.4 | | float'd - 0.400000
string'd - 0.5 | | float'd - 0.499999
string'd - 0.6 | | float'd - 0.600000
string'd - 0.7 | | float'd - 0.699999
string'd - 0.8 | | float'd - 0.800000
string'd - 0.9 | | float'd - 0.899999
string'd - 1.0 | | float'd - 1.000000
string'd - 1.1 | | float'd - 1.100000
string'd - 1.2 | | float'd - 1.200000
string'd - 1.3 | | float'd - 1.299999
string'd - 1.4 | | float'd - 1.400000
string'd - 1.5 | | float'd - 1.499999

Windows:
string'd - 0.1 | | float'd - 0.100000
string'd - 0.2 | | float'd - 0.200000
string'd - 0.3 | | float'd - 0.300000
string'd - 0.4 | | float'd - 0.400000
string'd - 0.5 | | float'd - 0.500000
string'd - 0.6 | | float'd - 0.600000
string'd - 0.7 | | float'd - 0.699999
string'd - 0.8 | | float'd - 0.800000
string'd - 0.9 | | float'd - 0.899999
string'd - 1.0 | | float'd - 1.000000
string'd - 1.1 | | float'd - 1.100000
string'd - 1.2 | | float'd - 1.200000
string'd - 1.3 | | float'd - 1.299999
string'd - 1.4 | | float'd - 1.399999
string'd - 1.5 | | float'd - 1.500000
string'd - 1.6 | | float'd - 1.600000
string'd - 1.7 | | float'd - 1.700000
string'd - 1.8 | | float'd - 1.799999
string'd - 1.9 | | float'd - 1.899999
__________________
xPaw is offline
 


Thread Tools
Display Modes

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 01:25.


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