Closed mikeingold closed 11 months ago
You need to provide a way to strip the units from the type. Currently, we use: https://github.com/JuliaMath/QuadGK.jl/blob/cb745d458495323414c27dfc33f8f77c60faf109/src/gausskronrod.jl#L571-L572
which assumes that one(T)
returns the underlying dimensionless numeric type.
See e.g. https://github.com/JuliaPhysics/Measurements.jl/issues/134
Thanks! I'll see what I can do to get these packages working together.
Closing in favor of https://github.com/SymbolicML/DynamicQuantities.jl/issues/40
Concur. Looks like this is due to DynamicQuantities’ current interpretation of the Base.one
spec.
I just started experimenting with the recent DynamicQuantities.jl package, which aims to provide the same functionality as Unitful.jl but with a statically-typed
Quantity
to improve performance. It looks likeQuadGK
currently doesn't support these DynamicQuantitiesQuantity
types, but I'm not familiar enough with the codebase to quite understand why.I'm interested in contributing by generating a PR for this, but would really appreciate a nudge in the right direction. It looks like the issue spawns from approximately here, where either a
@generated
cachedrule
isn't being produced at compile-time or maybe the genericcachedrule
below it isn't working.Any ideas that might help me understand what I can do to help integrate this functionality?
Thanks, Mike
Minimal reproduction (Julia v1.9.3):