Skip to content

InexactError() when checking if Float StepRange contains NaNs #26689

@daschw

Description

@daschw
julia> versioninfo()
Julia Version 0.6.2
Commit d386e40 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)

julia> Inf in 1:10
false

julia> NaN in 1:10
false

julia> Inf in 1.0:10.0
ERROR: InexactError()
Stacktrace:
 [1] in(::Float64, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}) at ./range.jl:865
 [2] macro expansion at /home/dani/.julia/v0.6/Revise/src/Revise.jl:775 [inlined]
 [3] (::Revise.##17#18{Base.REPL.REPLBackend})() at ./event.jl:73

julia> NaN in 1.0:10.0
ERROR: InexactError()
Stacktrace:
 [1] in(::Float64, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}) at ./range.jl:865
 [2] macro expansion at /home/dani/.julia/v0.6/Revise/src/Revise.jl:775 [inlined]
 [3] (::Revise.##17#18{Base.REPL.REPLBackend})() at ./event.jl:73

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions