Open blegat opened 1 year ago
Thanks for the issue! I don't think the solution is to restrict the more accurate branch to AbstractFloat
, because then we would hit the less accurate branch whenever using wrappers of floating point numbers, e.g. those in ForwardDiff and ReverseDiff.
A better way is probably to specialize abs(::Quaternion{Num})
to hit the simpler version. On Julia v1.9, we can do this with a package extension (suggested in https://github.com/JuliaGeometry/Quaternions.jl/issues/123#issuecomment-1404150924). It makes more sense to include such an extension QuaternionsSymbolicsExt here than in Symbolics.
We used to be able to use
Symbolics.Num
in quaternions but https://github.com/JuliaGeometry/Quaternions.jl/pull/122/ broke our workflow; see https://github.com/dionysos-dev/Dionysos.jl/issues/211The issue is that
isinf
is not defined forNum
types defined in Symbolics. Maybe these could be done only forAbstractFloat
?cc @sethaxen