Replies: 1 comment
-
|
Out of Hipparchus, I would say fma is probably intended for better accuracy (see for example Jean-Michel Muller books on floating point arithmetic and on elementary functions). It may be faster too than computing separately because fma is handled in hardware in many modern processors. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the use case for the
Math.fma()method?Is it only available to improve accuracy for calculating
(a * b) + cor can it sometimes also help speeding up computation?For example in the vector dot product this operation can be modified to use the
fmamethod:hipparchus/hipparchus-core/src/main/java/org/hipparchus/linear/ArrayRealVector.java
Line 462 in 3ab8c5e
I assume the
fmamethod call is "in general" slower than calculating(a * b) + cdirectly?Beta Was this translation helpful? Give feedback.
All reactions