llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

APFloat::fusedMultiplyAdd incorrect when using a single instance for all arguments

Open ekatz opened this issue 7 years ago • 2 comments

Bugzilla Link 44051
Resolution FIXED
Resolved on Jan 07, 2020 01:34
Version trunk
OS All
CC @hfinkel
Fixed by commit(s) rG08de551f4f10

Extended Description

The following simple test should result with x equals to 3.75, while the result we actually get is 4.5.

APFloat x(1.5); x.fusedMultiplyAdd(x, x, APFloat::rmNearestTiesToEven);

ekatz avatar Nov 19 '19 07:11 ekatz

Fix available in https://reviews.llvm.org/D70422

ekatz avatar Nov 19 '19 08:11 ekatz

assigned to @ekatz

ekatz avatar Nov 19 '19 07:11 ekatz