Different inner product if vector type is not set

I think you do, but you may be surprised to know that floating point addition is not associative (due to, essentially, rounding).

julia> @show (-1e30+1e30)+1.0 -1e30+(1e30+1.0);
(-1.0e30 + 1.0e30) + 1.0 = 1.0
-1.0e30 + (1.0e30 + 1.0) = 0.0
3 Likes