Raised This Month: $32 Target: $400
 8% 

Did you know ... ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 07-01-2014 , 05:52   Did you know ... ?
Reply With Quote #1

Post you own similiar findings here aswell

FloatFraction
did you know that the decimal of 1.01 returns 0.00 , 1.99 returns: 0.99, 1 returns: 0.00,
2.10 returns: 0.09, 3.11 returns: 0.10, 4.33 returns: 0.32
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 07-01-2014 at 05:55.
striker07 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-01-2014 , 07:24   Re: Did you know ... ?
Reply With Quote #2

What you posted is for SourceMod and there is a forum for AmxModX.

Last edited by HamletEagle; 07-01-2014 at 07:28.
HamletEagle is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-01-2014 , 08:54   Re: Did you know ... ?
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
What you posted is for SourceMod and there is a forum for AmxModX.
This is the Off-Topic section for the entire site, not just AMXX. Plus, this thread was originally in SRCDS and it didn't belong there
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 07-01-2014 at 08:55.
YamiKaitou is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-01-2014 , 09:49   Re: Did you know ... ?
Reply With Quote #4

Quote:
Originally Posted by striker07 View Post
Post you own similiar findings here aswell

FloatFraction
did you know that the decimal of 1.01 returns 0.00 , 1.99 returns: 0.99, 1 returns: 0.00,
2.10 returns: 0.09, 3.11 returns: 0.10, 4.33 returns: 0.32
Welcome to the fun of floating point numbers where everything is rounded and the points don't matter.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 07-01-2014 , 13:26   Re: Did you know ... ?
Reply With Quote #5

Where FF2 is not caching KeyValues files?
WildCard65 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-01-2014 , 14:47   Re: Did you know ... ?
Reply With Quote #6

You are probably just seeing rounding of the mantissa. What happens when you show more decimal places?
__________________
fysiks is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 07-05-2014 , 05:00   Re: Did you know ... ?
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
You are probably just seeing rounding of the mantissa. What happens when you show more decimal places?
Didnt try this, i'd expect 1.333 would return 0.332, and 1.330 would return 0.330, the rounded number just moves one further?
Defenilty gonna try that next time
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 07-05-2014 at 05:02.
striker07 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-05-2014 , 18:42   Re: Did you know ... ?
Reply With Quote #8

He means, for example:
4.33 returns: 0.32
is actually
4.33 returns: 0.329999
if you display more decimals
__________________

Last edited by Black Rose; 07-05-2014 at 18:42.
Black Rose is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-05-2014 , 22:38   Re: Did you know ... ?
Reply With Quote #9

The precision of floating point numbers is significantly beyond the hundredths place so I'm quite confident that what you are seeing is only an artifact of displaying the number.
__________________
fysiks is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-06-2014 , 00:32   Re: Did you know ... ?
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
The precision of floating point numbers is significantly beyond the hundredths place so I'm quite confident that what you are seeing is only an artifact of displaying the number.
I think it's 6 decimals precision if i interpret this Wiki page correctly:
http://en.wikipedia.org/wiki/Single-...g-point_format
__________________
Black Rose is offline
Reply


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 19:42.


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