Bug Report: Changing Commitment Period Loses Significantly Many Significant Figures

Replicata

Hilariously, this starts in precisely the way the bugreports blog post starts:

  1. Create a new Do More goal at a rate of 2 whatevers per week
    a. Specifically: New Goal, select Manual, select Do More, set the rate to “2/7” which will correctly but rather ugly-ly turn into “0.2857142857142857”, set any unit name, set any goal name, set starting stakes, accept card on file. So far so good.
  2. Go to your new goal page’s Commitment tab. Observe what appears to be the reasonably sensibly rounded rate of 0.29 per day.
  3. Set the dropdown to “per week” instead of “per day”.
  4. Observe the very much not what was entered rate of 2.03 per week. Do not save yet.
  5. Suspect that the daily rate isn’t just visually rounded but is actually rounded to 0.29 (since 0.29×7=2.03) and go to graph.beeminder.com to check the actual matrix.
  6. Observe that in the graph editor, the final Daily Slope is 0.28571, which is reasonably fine.
  7. Go back to the goal page and click Commit to save the “per week” change.
  8. Reload the graph editor, and observe that the final Weekly Slope is now precisely 2.03.
  9. Go back to the goal page, set the dropdown back to “per day”, and commit.
  10. Reload the graph editor, and observe that the final Daily Slope is now precisely 0.29.

If you want, you can see the goal that I did these steps on at Beeminder (as long as it’s before the point on 2022-02-28 when I delete that goal so it doesn’t actually charge me anything). I actually deleted it early, after checking with @dreev that he got what he needed out of it!

Expectata

Changing the commitment rate period to “week” and then back to “day” without touching the input box does not meaningfully change my true-value commitment amount.

I wouldn’t be surprised by fluctuation in the least significant digit due to floating-point shenanigans—really, I’d love to be able to specify a rate as “2/7” and have that actually be parsed correctly all on its own, but that’s a much bigger ticket.

Resultata

My rate is turned from “as close to 2/7 as a float can handle” to “precisely 0.29”, which is about 2% higher of a rate than I wanted.

5 Likes

Beautiful/delightful bug report! Thank you! (I’m worried you’re setting the bar so high that others won’t submit normal-person bug reports after seeing this, as lamented in the intro of blog.beeminder.com/bugreports.) DM me a postal address to claim your bug bounty (it’s stickers)!

[internal link: https://github.com/beeminder/beeminder/issues/3027]

1 Like

Well I certainly don’t want to intimidate anyone! :smiley: But I am a software dev too and I sure love a good replicable bug report so when I can find the right bits I ain’t gonna stop :3

Stickers ahoy!

2 Likes