Skip to content

Remove UnitfulIntegration.jl from README#578

Merged
giordano merged 1 commit intoJuliaPhysics:masterfrom
sostock:remove_unitfulintegration
Mar 5, 2024
Merged

Remove UnitfulIntegration.jl from README#578
giordano merged 1 commit intoJuliaPhysics:masterfrom
sostock:remove_unitfulintegration

Conversation

@sostock
Copy link
Collaborator

@sostock sostock commented Nov 2, 2022

UnitfulIntegration.jl is also no longer needed, QuadGK can handle Unitful quantities since QuadGK v2.1.0.

I decided to remove the entry (instead of declaring it deprecated like UnitfulRecipes.jl) because it cannot even be installed with Unitful 1.x (it requires Unitful 0.x), so it isn’t relevant to the package in its current state.

Closes #376.

@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2022

Codecov Report

Merging #578 (577703d) into master (ebad449) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #578   +/-   ##
=======================================
  Coverage   87.92%   87.92%           
=======================================
  Files          16       16           
  Lines        1449     1449           
=======================================
  Hits         1274     1274           
  Misses        175      175           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sostock
Copy link
Collaborator Author

sostock commented Nov 2, 2022

I just noticed that infinite integration limits don’t work, so the statement that QuadGK supports Unitful quantities is not correct (infinite integration limits were supported by UnitfulIntegration.jl):

julia> quadgk(x->exp(-x/(1.0m)), 0.0m, Inf*m)
ERROR: DomainError with Inf m:
integrand produced NaN m in the interval (0.0 m, Inf m)
Stacktrace:
[...]

So we should either bring UnitfulIntegration.jl up to date or make a PR to QuadGK to support infinite quantities as integration limits.

@sostock sostock closed this Nov 2, 2022
@giordano
Copy link
Member

giordano commented Mar 5, 2024

That seems to be working now:

julia> using QuadGK, Unitful

julia> quadgk(x->exp(-x/(1.0u"m")), 0.0u"m", Inf*u"m")
(1.0 m, 4.507382674563286e-11 m)

@giordano giordano reopened this Mar 5, 2024
@giordano giordano merged commit 7a0bc33 into JuliaPhysics:master Mar 5, 2024
@sostock sostock deleted the remove_unitfulintegration branch May 17, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove UnitfulIntegration from the readme

3 participants

Comments