The √
is actually a prefix operator (and not just a function name) so you can do things like √2
. This means that it gets dotted like all the other operators — with a dot prefix.
julia> .√[1,2,3]
3-element Array{Float64,1}:
1.0
1.41421
1.73205
julia> .![true,false,true]
3-element BitArray{1}:
false
true
false
julia> .-[1,2,3]
3-element Array{Int64,1}:
-1
-2
-3