Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Max() bug?

$
0
0
julia> a=[1,2,3];
julia> b=[10,-Inf,9];
julia> c=[-30,5,2];
julia> max(a,b,c)
3-element Array{Float64,1}:
  10.0
 -Inf
   9.0
julia> max.(a,b,c)
3-element Array{Float64,1}:
 10.0
  5.0
  9.0

max.(a,b,c) is correct. Why is it not equal to max(a,b,c) for the second element?

6 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles