drneau.com Forum Index drneau.com
A discussion board for drneau.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rounding

 
Post new topic   Reply to topic    drneau.com Forum Index -> Payout Schedules, Chops & Side Bets
View previous topic :: View next topic  
Author Message
Muley05
"A Set of Mop Squeezers"


Joined: 14 Jan 2009
Posts: 53

PostPosted: Thu Apr 09, 2009 10:51 am    Post subject: Rounding Reply with quote

I like that we now have the option to round the percentage payout numbers in a payout schedule. Any reason why the number doesn't round up when it is .5 or higher rather than .6?
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Thu Apr 09, 2009 11:51 am    Post subject: Reply with quote

It should be rounding up for .5 or higher. Basically, I just add 0.5 and truncate.

Gimmie a for instance.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Muley05
"A Set of Mop Squeezers"


Joined: 14 Jan 2009
Posts: 53

PostPosted: Thu Apr 09, 2009 3:59 pm    Post subject: Reply with quote

I'm in the payout schedule I customized. It is for 10-10,000 players, pays out over 25% of the buy ins with a spread of 50% and a decay of 30%.

When I edit the Distribution Method, for rounding the two options it gives me are: Round (3.6-->4) or Truncate (3.6-->3). And if I put 10 players in the preview, it only pays out 2 players (25% of 10 is 2.5 players, and it rounds that down to 2 because it is not 2.6 or higher). Does this make sense?
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Thu Apr 09, 2009 4:17 pm    Post subject: Reply with quote

Well, the 3.6 thing is a typo, so I'll fix that.

As far as the 25% of 10 being 2.5...that's a matter opinion and number crunching.

I fear we might be running into an issue where 25% of 10 is actually represented as 2.49999999999999999999999999

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Thu Apr 16, 2009 8:22 am    Post subject: Reply with quote

Muley05 wrote:
I'm in the payout schedule I customized. It is for 10-10,000 players, pays out over 25% of the buy ins with a spread of 50% and a decay of 30%.

When I edit the Distribution Method, for rounding the two options it gives me are: Round (3.6-->4) or Truncate (3.6-->3). And if I put 10 players in the preview, it only pays out 2 players (25% of 10 is 2.5 players, and it rounds that down to 2 because it is not 2.6 or higher). Does this make sense?


I got around to trying your exact scenario last night and, at least for me, it actually works the way it is supposed to and pays out 3.

Can you check it again?
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Muley05
"A Set of Mop Squeezers"


Joined: 14 Jan 2009
Posts: 53

PostPosted: Thu Apr 16, 2009 8:34 am    Post subject: Reply with quote

It now works and it paying out three spots when I have 10 entrants. The rounding method still says 3.6-->4, but that isn't a big deal as long as it is rounding properly, and it looks ike that is the case now.
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Thu Apr 16, 2009 8:35 am    Post subject: Reply with quote

Muley05 wrote:
It now works and it paying out three spots when I have 10 entrants. The rounding method still says 3.6-->4, but that isn't a big deal as long as it is rounding properly, and it looks ike that is the case now.


Note, though, that you're still using the same version. I haven't changed anything yet.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    drneau.com Forum Index -> Payout Schedules, Chops & Side Bets All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group