Dubious explanation in documentation for why division by zero doesn't raise an error #4286
Closed
tyilo
started this conversation in
Ideas & suggestions
Replies: 2 comments 5 replies
-
https://gleam.run/frequently-asked-questions/#why-does-division-by-zero-return-zero |
Beta Was this translation helpful? Give feedback.
3 replies
-
@lpil Why was this closed? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation for
gleam/float
currently contains the following text:The justification
seems weird, as this doesn't explain why
1.0e308 *. 2.0
is allowed to raise an error, but1.0 /. 0.0
is not.I don't now what a partial function is defined as in Gleam, but I think
*.
could be considered partial when it can raise an error.I think the reasoning could be reworded to explain why overflows are allowed to raise an error, when division by zero is not.
Beta Was this translation helpful? Give feedback.
All reactions