r/ProgrammerHumor • • 25d ago

Meme reversingPiInPython

Post image
14k Upvotes

383 comments sorted by

View all comments

Show parent comment

12

u/nicki419 25d ago

That would round up to 4, actually

14

u/Legitimate_Concern_5 25d ago edited 25d ago

Depends on your rounding strategy, sometimes 3 sometime 4. Round half up is the most common but you can round half down, round half towards even (Banker's rounding/Gaussian rounding), round half towards odd, or towards/away from infinity.

2

u/Agreeable_Bread_2327 24d ago

This guy maths.

2

u/geek-49 22d ago

or random choice each time. Arguably a good strategy in quantum calculations.

1

u/hitthebucket2026 24d ago

Depends how many decimals you're rounding from/to