add BigFloat fma and muladd#211
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #211 +/- ##
==========================================
+ Coverage 88.80% 88.96% +0.16%
==========================================
Files 22 22
Lines 2108 2121 +13
==========================================
+ Hits 1872 1887 +15
+ Misses 236 234 -2
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
| # one at http://mozilla.org/MPL/2.0/. | ||
|
|
||
| @testset "fma $op output values" for op in (MA.operate_to!, MA.operate_to!!), | ||
| i in 1:100 |
There was a problem hiding this comment.
I prefer a few fixed tests for which we know muladd is different than fma than 100 random tests since it's difficult to reproduce
There was a problem hiding this comment.
Now the testing approach is to try a range of two-bit BigFloat values.
| y::F, | ||
| z::F, | ||
| ) where {F<:BigFloat} | ||
| return operate_to!(output, Base.fma, x, y, z) |
There was a problem hiding this comment.
I'm not sure we want to do this because then muladd(x, y, z) would give a different result that operate!(muladd, x, y, z) wouldn't it ?
There was a problem hiding this comment.
Julia Base is being changed in the same direction, using the fused mpfr_fma for muladd: JuliaLang/julia#49401
|
How to fix this: Do I need to define an |
|
The documentation actually leads me to believe that I shouldn't need to do anything, as immutable types should fall back to |
Yes, MutableArithmetics.jl/src/interface.jl Lines 213 to 217 in 86a502e You can add fma inMutableArithmetics.jl/src/interface.jl Lines 193 to 207 in 86a502e |
No description provided.