Skip to content

Conversation

sostock
Copy link
Contributor

@sostock sostock commented Jun 10, 2021

Fixes #26689.

Before:

julia> Inf in 1.0:5.0
ERROR: InexactError: trunc(Int64, Inf)
[...]

julia> NaN in 1.0:5.0
ERROR: InexactError: trunc(Int64, NaN)
[...]

After:

julia> Inf in 1.0:5.0
false

julia> NaN in 1.0:5.0
false

@oscardssmith
Copy link
Member

oscardssmith commented Jun 10, 2021

Is this fixing a regression?

@sostock
Copy link
Contributor Author

sostock commented Jun 10, 2021

It’s not a regression, the bug exists since version 0.7 or earlier.

@JeffBezanson JeffBezanson added backport 1.6 Change should be backported to release-1.6 backport 1.7 bugfix This change fixes an existing bug labels Jun 14, 2021
@JeffBezanson JeffBezanson merged commit 9a9e5a3 into JuliaLang:master Jun 14, 2021
KristofferC pushed a commit that referenced this pull request Jun 17, 2021
@KristofferC KristofferC mentioned this pull request Jun 17, 2021
20 tasks
KristofferC pushed a commit that referenced this pull request Jun 29, 2021
@KristofferC KristofferC mentioned this pull request Jun 29, 2021
45 tasks
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Jul 12, 2021
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InexactError() when checking if Float StepRange contains NaNs
4 participants