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

It should be mentioned in the manual that Rationals are checked for overflow #31143

Closed
jmichel7 opened this issue Feb 21, 2019 · 1 comment
Closed
Labels
domain:docs This change adds or pertains to documentation domain:rationals The Rational type and values thereof good first issue Indicates a good issue for first-time contributors to Julia status:help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@jmichel7
Copy link

I looked in detail at the code for Rationals and it seems that they are in all circumstances checked for
overflow --- actually while reviewing the code I detected one test missing, which indeed allows:

julia> 1//typemin(Int)
-1//-9223372036854775808

but this should be easily fixable.

I think it is be important to mention in the manual this safety of Rationals (and perhaps also mention the existence of the package SaferIntegers).

@jmichel7 jmichel7 changed the title It should be mentiond in the manual that Rationals are checked for overflow It should be mentioned in the manual that Rationals are checked for overflow Feb 21, 2019
@stevengj stevengj added domain:docs This change adds or pertains to documentation domain:rationals The Rational type and values thereof labels Feb 22, 2019
@StefanKarpinski StefanKarpinski added status:help wanted Indicates that a maintainer wants help on an issue or pull request good first issue Indicates a good issue for first-time contributors to Julia labels Feb 22, 2019
@Moelf
Copy link
Sponsor Contributor

Moelf commented May 14, 2019

@StefanKarpinski can you take a look and merge the PR, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation domain:rationals The Rational type and values thereof good first issue Indicates a good issue for first-time contributors to Julia status:help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

4 participants