From: Jacob Lifshay Date: Wed, 17 May 2023 04:48:04 +0000 (-0700) Subject: fix round nearest-even X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=082f1ea77ee752fa0c85b40ec40f56d30d4bc36b;p=openpower-isa.git fix round nearest-even --- diff --git a/openpower/isafunctions/bfp.mdwn b/openpower/isafunctions/bfp.mdwn index 44ac7871..c6dd2d9f 100644 --- a/openpower/isafunctions/bfp.mdwn +++ b/openpower/isafunctions/bfp.mdwn @@ -291,7 +291,7 @@ section 7.6.2.2 if temp = 0 then halfway <- 1 else more_than_halfway <- 1 if rmode = 0b000 then # Round to Nearest Even - round_up <- (even & halfway) | more_than_halfway + round_up <- (¬even & halfway) | more_than_halfway if rmode = 0b001 then # Round towards Zero round_up <- 0 if rmode = 0b010 then # Round towards +Infinity