Mateusz Baran
Mateusz Baran
Any change of regular matrix-vector multiplication after loading StaticArrays.jl is very much unexpected and undesirable. I couldn't reproduce your results though: ```julia julia> Array(lookMat) * [0.5, 0.5, 0, 1] 4-element...
I'm not 100% sure but to me it looks like the loss of accuracy is in one of the conversions ```julia julia> repr(lookMat) # from lookAt "Float32[-0.70710677 0.70710677 0.0 -0.0;...
The issue is that `lookAt` that works on `Array` and `lookAt` that works on `SArray` don't compute the exact same thing: ```julia julia> using StaticArrays, LinearAlgebra julia> const Vec3 =...
Now I see that the difference is even earlier. Here: `lookMatS = lookAt(Vec3(2,2,2), Vec3(0.5, 0.5, 0), Vec3(0,0,1))` we work on `Float32` input, while here: `lookMat = lookAt([2,2,2], [0.5, 0.5, 0],...
Good question -- I'm not even sure if you can expect that code (`lookAt`) to be more accurate.
It works if you provide all arguments to `SMatrix` (which is strongly suggested): ```julia A = zeros(SMatrix{3,3,Float64,9}, 2, 3) ``` Note that without `,9`: ```julia julia> isbitstype(eltype(A)) false ```
I guess we could use `Base.Experimental.register_error_hint` but I'm not sure if that's the right thing to do. This error, actually, is far from the worst errors that I've seen and...
You can use the three-parameter variant for constructing `SMatrix` objects, and the fourth one will be automatically added: ```julia julia> SMatrix{2,2,Float64}(1, 2, 3, 4) 2×2 SMatrix{2, 2, Float64, 4} with...
I think `SArray` creating `SVector` by default wouldn't be particularly robust. There just needs to be a package that implements `ConstructionBase` for `StaticArrays`.
I think ideally 3- and 4-arg methods of `*` would decide during compilation what the best order is, using generated functions and your cost model from that PR. Could you...