JuliaHEP / JuliaHEP-2023

Materials for the JuliaHEP 2023 Workshop
https://juliahep.github.io/JuliaHEP-2023/
Creative Commons Attribution 4.0 International
4 stars 4 forks source link

Careful with `\` #13

Closed Moelf closed 10 months ago

Moelf commented 10 months ago

The docs specifically says:

The following arithmetic operators are supported on all primitive numeric types:

because \ is generally not reverse divide, I suggest we just drop it because it's irrelevant.

julia> a = rand(2,2) ; b = rand(2,2)
2×2 Matrix{Float64}:
 0.969601  0.514989
 0.726549  0.992856

julia> a\b
2×2 Matrix{Float64}:
 0.320213  0.915258
 1.64899   0.459744

julia> b/a
2×2 Matrix{Float64}:
 0.568586  0.837365
 1.77009   0.211371

@aoanla

aoanla commented 10 months ago

Well, that's @graeme-a-stewart 's bit from his part of the documentation :D I agree that the list of operators is still very complete looking without it, and it is the most subtle case with different contextual meanings.

aoanla commented 10 months ago

(Arguably this would be fixed by any reduction of detail when resolving #12 , if we just mention a few exceptional operators)