-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warning about floating-point arithmetic to foreach
introduction
#1053
base: master
Are you sure you want to change the base?
Conversation
Could you please write a little more succinct commit messages? Commit messages can have more than one line, so something like this would be more appropriate:
See also https://www.conventionalcommits.org/, although we do not entirely practice this here (yet). |
Thanks for the link, I'll try to write better commit messages in the future (as well as try to remember to sign my commits). Since I'm not sure how to retroactively sign commits, my plan was to close this PR and submit a new one. Should I instead fix this one somehow? |
You can run |
0408293
to
8b02a24
Compare
Per a suggestion from @muzimuzhi on pgf-tikz#1050, add a warning about floating-point arithmetic to the first introduction of `foreach` in Karl's tutorial. Signed-off-by: 3geek14 <nerd.of.pi@gmail.com>
8b02a24
to
7f7db96
Compare
Co-authored-by: muzimuzhi <muzimuzhi@gmail.com>
Hmm applying suggested changes on github's webpage (by adding "Co-authored-by" trailer) will always not add the "Signed-off-by" trailer, which makes the check failed. Even worse when the two trailers are used together, whom the "I" used in Developer Certificate of Origin is referring would be not unique / unclear. Someone may interpret that only the committer is signed off, not including the one co-authored. @hmenke What's your opinion in the long term? |
Signed-off-by is not really important for small fixes. It's more important for new features. I don't want to get trolled again by someone who doesn't understand their own licensing terms. |
Signed-off-by: 3geek14 nerd.of.pi@gmail.com
Motivation for this change
On #1050, @muzimuzhi suggested it might be worth adding a warning about floating-point errors in
foreach
loops to the tutorial where they are first introduced. I think my suggested change might be a bit cryptic about what sorts of rounding errors show up, but I don't know how explicit it's worth being here, when it's spelled out in far more detail in section 88, Repeating Things: The Foreach Statement. I also added to the example code a second loop that does have a rounding error preventing the final tick from being drawn.Checklist
Please check the boxes below and signoff your commits to explicitly
state your agreement to the Developer Certificate of Origin: