-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
type stability #36
type stability #36
Conversation
|
That to me seems like something that is unlikely to occur in most user code, so I'd agree that it's not likely worth the trouble. Though perhaps a warning about it in the documentation would be warranted, in the off chance someone runs into it? |
That's frustrating. Why does the quadrature weights calculation need real numbers? Perhaps one thing that could be done is put in a function ie.
|
I pushed a fix for type-unstable functions; it turned out to be not too hard. |
Then any package that wanted this to work would have to depend on QuadGK. This really needs to go into Base. |
Maybe packages that define new number types should define |
What is the "raw-floating-point value"? |
Makes the
quadgk
function type-stable. Closes #21. Closes #19. Closes #15. Closes #20.Also fixes handling of some other other number types, and in particular fixes dimensionful types (#17). Mostly supersedes https://github.com/PainterQubits/UnitfulIntegration.jl, cc @ajkeller34:
It still doesn't completely address #13, because it only works if
real(one(T))
returns the underlying real numeric type for computing the quadrature weights etc. This doesn't work for dual numbers (ForwardDiff.jl) or measurements (JuliaPhysics/Measurements.jl#31), and in general I haven't been able to think of a way to do this that works across packages.