Skip to content

norm of Unitful SVector is NaN #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jgreener64 opened this issue Feb 13, 2023 · 0 comments · Fixed by #1128
Closed

norm of Unitful SVector is NaN #1127

jgreener64 opened this issue Feb 13, 2023 · 0 comments · Fixed by #1128
Labels

Comments

@jgreener64
Copy link

On StaticArrays 1.5.14:

julia> using StaticArrays, Unitful, LinearAlgebra

julia> norm(SVector(0.0, 0.0))
0.0

julia> norm(SVector(0.0, 0.0)u"nm")
NaN nm

I would expect 0.0 nm. This worked on StaticArrays 1.5.12, errored with #1124 on StaticArrays 1.5.13, and shows the above issue on StaticArrays 1.5.14 after the introduction of #1125.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants