Skip to content

dfmul_vf2_vf_vf, WTF #585

Answered by blapie
2A5F asked this question in Q&A
Oct 8, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

The result isn't {x * y, 0}, you have to take into account that operations are done in finite precision arithmetic.
Changing your notations slightly and writing x * y the result of the exact/infinite precision multiplication and fl(x * y) the result of the floating point one, then vf2 contains { fl(x * y), e }, which is on one hand the result of the finite precision multiplication, and on the other hand an estimation of the error e = x * y - fl(x * y) (|e| < x * y * eps).
Storing this error prevents cancellation in allowing you to re-inject the error into future operations instead, thus creating "error-free" transformations (not entirely free but at least in the first or second order).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@blapie
Comment options

Answer selected by 2A5F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants