Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #483 +/- ##
==========================================
+ Coverage 94.11% 94.17% +0.06%
==========================================
Files 14 15 +1
Lines 2905 2935 +30
==========================================
+ Hits 2734 2764 +30
Misses 171 171
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
|
||
| Worst case accuracy is about 2e-16. | ||
| """ | ||
| function owent(h::T, a::T) where {T <: Real} |
There was a problem hiding this comment.
It seems like this implementation is specific to Float64.
There was a problem hiding this comment.
Indeed. I adapted the integration.
src/owent.jl
Outdated
| towen = zero(a) | ||
| @inbounds for i in eachindex(w) | ||
| towen += w[i] * t2(h,a,x[i]) | ||
| end |
There was a problem hiding this comment.
Since these are tuples, you should be able to just do:
| towen = zero(a) | |
| @inbounds for i in eachindex(w) | |
| towen += w[i] * t2(h,a,x[i]) | |
| end | |
| towen = sum(w .* t2.(h, a, x)) |
and it will be allocation-free and unrolled, no?
|
In general, I think we're hoping to move in the direction of breaking different special functions into their own packages, rather than increasing the size of this package. Maybe this should just be its own package? |
A single package just for this function? Or should it be a package devoted to Owen's table? |
Following up on #242 and JuliaStats/StatsFuns.jl#99.
This implementation should not have any license issues, because it is based on JuliaStats/StatsFuns.jl#99 (comment).
I compared the implementation to scipy with the following code. The Julia version is usually 1.5-3 times faster than scipy; outliers are due to shortcut implementations in the Julia version.