Author Topic: Possible bug in prizes  (Read 3442 times)

IBuyCars

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Possible bug in prizes
« on: March 01, 2013, 09:54:43 AM »
Hi Corey

I have noticed that at least one of the (Manual) prizes sometimes shows a value different to the amount entered.

I have sent the file to you, its prize No:13

I have noticed the same thing happening in version 2

Regards

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Possible bug in prizes
« Reply #1 on: March 01, 2013, 12:03:59 PM »
Interesting.  For those following along, the tournament sent to me has a fixed value of $20.40 and an adjustment of $0.01, which means it should have a value of $20.41, but it still shows as $20.40.  If Ithe adjustment is removed it has a value of $20.39.  I'm going to have to look into that.  Thanks for sending it to me.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Possible bug in prizes
« Reply #2 on: March 01, 2013, 12:16:19 PM »
This issue boils down to the way math is performed in Javascript, and the TD has been working around it ever since I realized it was an issue.  Specific to this case:

20.4 * 100 = 2039.9999999999997

If I could go back and do it all over again, internally all values would be stored as whole numbers and divided by 100 when displayed.  I've fixed this in the next 3.2 beta/final.  Thanks IBuyCars.

IBuyCars

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Possible bug in prizes
« Reply #3 on: March 01, 2013, 12:35:54 PM »
I'm glad to help

PS fantastic software