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

primes(0) returns error #82

Open
blackeneth opened this issue May 2, 2020 · 0 comments
Open

primes(0) returns error #82

blackeneth opened this issue May 2, 2020 · 0 comments

Comments

@blackeneth
Copy link

Problem Statement
primes(0) returns an error.

Desired Behavior
primes(0) returns a 0-element array like primes(0,0) and primes(0,1) do.

Example

julia> primes(0)
ERROR: ArgumentError: The condition lo ≤ hi must be met.
Stacktrace:
 [1] primes(::Int64, ::Int64) at C:\Users\amgough\.juliapro\JuliaPro_v1.4.0-1\packages\Primes\uaYlp\src\Primes.jl:111
 [2] primes(::Int64) at C:\Users\amgough\.juliapro\JuliaPro_v1.4.0-1\packages\Primes\uaYlp\src\Primes.jl:126
 [3] top-level scope at none:0

julia> primes(0,0)
0-element Array{Int64,1}

julia> primes(0,1)
0-element Array{Int64,1}

Julia version and Primes.jl version:

julia> versioninfo()
Julia Version 1.4.0
Commit b8e9a9ecc6 (2020-03-21 16:36 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-4960X CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, ivybridge)
julia> Pkg.status("LinearAlgebra")
 [37e2e46d] LinearAlgebra

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

No branches or pull requests

1 participant