Closed jmert closed 4 years ago
Merging #16 into master will increase coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #16 +/- ##
==========================================
+ Coverage 95.51% 95.52% +0.01%
==========================================
Files 9 9
Lines 245 246 +1
==========================================
+ Hits 234 235 +1
Misses 11 11
Impacted Files | Coverage Δ | |
---|---|---|
src/norm_sphere.jl | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a0eadb8...2210077. Read the comment docs.
The first commit simply eliminates a few unwanted instructions.
@fastmath(sqrt)
gets rid of the domain checking that the argument is positive, which eliminates one branch from the fast path.The second commit is more subtle. The expression for the μ_ℓ coefficient in the spherical normalization is modified to gain a few ulps of accuracy across what is probably the entire practical domain of degrees (ℓ). (N.B. the
muladd
subexpression does not need to be an FMA to maintain accuracy, but FMA is allowed if it is more efficient.)Before:
With this PR: