hardposit-chisel3 icon indicating copy to clipboard operation
hardposit-chisel3 copied to clipboard

Error in posit subtraction

Open Mark1626 opened this issue 1 year ago • 0 comments

There is an issue in posit subtraction that causes the following to returns an incorrect result. Issue is most likely due to incorrect regime bit being created

nbits - 32
es - 2
7.000091552734375 - 7.00

Reproducing

This can be reproduced by the adding the following unit test to PositAddSpec.scala

it should "return posit" in {
    posit_add_test(32, 2, 1442843648, 1442840576, 2101346304, sub=true)
}

Mark1626 avatar Apr 09 '24 12:04 Mark1626