Skip to content
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

feat(koan): add a koan about rounding pitfalls #290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Goutte
Copy link

@Goutte Goutte commented Jul 15, 2024

Hint

2.675 is actually approximated in IEE754 as: 2.67499999999999982236431605997495353221893310546875

The solution is 2.67

This is because 2.675 is actually approximated in IEE754:
2.67499999999999982236431605997495353221893310546875

Close, but no cigar.

Fixes elixirkoans#268

/spend 30m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants