-
Notifications
You must be signed in to change notification settings - Fork 8
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
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. |
test/bigfloat_fma.jl
Outdated
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Julia Base
is being changed in the same direction, using the fused mpfr_fma
for muladd
: JuliaLang/julia#49401
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to go then
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.