I gave a tutorial to my students on a mac and showed that Julia gives a reasonable error message for a singular system:
julia> versioninfo()
Julia Version 0.6.0
Commit 903644385b (2017-06-19 13:05 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
julia> A = [1 2 3; 4 5 6; 7 8 9]
3Ă3 Array{Int64,2}:
1 2 3
4 5 6
7 8 9
julia> b = [1;2;3]
3-element Array{Int64,1}:
1
2
3
julia> A\b
ERROR: Base.LinAlg.SingularException(3)
Stacktrace:
[1] A_ldiv_B! at ./linalg/lu.jl:238 [inlined]
[2] \(::Base.LinAlg.LU{Float64,Array{Float64,2}}, ::Array{Int64,1}) at ./linalg/factorization.jl:48
[3] \(::Array{Int64,2}, ::Array{Int64,1}) at ./linalg/generic.jl:817
But on my studentâs Windows computer, he gets an answer!
julia> versioninfo()
Julia Version 0.6.0
Commit 903644385b* (2017-06-19 13:05 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
julia> A = [1 2 3; 4 5 6; 7 8 9]
3Ă3 Array{Int64,2}:
1 2 3
4 5 6
7 8 9
julia> b = [1; 2; 3]
3-element Array{Int64,1}:
1
2
3
julia> A\b
3-element Array{Float64,1}:
-0.333333
0.666667
0.0
These are both Juliaâs current release.
Why the difference?