if ro=1 then r <- bfp_ROUND_ODD(53, x)
if bfp_COMPARE_GT(bfp_ABSOLUTE(r), bfp_NMAX_BFP64()) then
if FPSCR.OE=0 then
- if x.sign then
- if (ro=0) & (rmode=0b00) then r <- bfp_INFINITY()
- if (ro=0) & (rmode=0b01) then r <- bfp_NMAX_BFP64()
- if (ro=0) & (rmode=0b10) then r <- bfp_NMAX_BFP64()
- if (ro=0) & (rmode=0b11) then r <- bfp_INFINITY()
- if ro=1 then r <- bfp_NMAX_BFP64()
- else
- if (ro=0) & (rmode=0b00) then r <- bfp_INFINITY()
- if (ro=0) & (rmode=0b01) then r <- bfp_NMAX_BFP64()
- if (ro=0) & (rmode=0b10) then r <- bfp_INFINITY()
- if (ro=0) & (rmode=0b11) then r <- bfp_NMAX_BFP64()
- if ro=1 then r <- bfp_NMAX_BFP64()
+ if (ro=0) & (rmode=0b00) then r <- x.sign ? bfp_INFINITY() : bfp_INFINITY()
+ if (ro=0) & (rmode=0b01) then r <- x.sign ? bfp_NMAX_BFP64() : bfp_NMAX_BFP64()
+ if (ro=0) & (rmode=0b10) then r <- x.sign ? bfp_NMAX_BFP64() : bfp_INFINITY()
+ if (ro=0) & (rmode=0b11) then r <- x.sign ? bfp_INFINITY() : bfp_NMAX_BFP64()
+ if ro=1 then r <- x.sign ? bfp_NMAX_BFP64() : bfp_NMAX_BFP64()
r.sign <- x.sign
ox_flag <- 0b1
xx_flag <- 0b1
if bfp_COMPARE_GT(bfp_ABSOLUTE(r), bfp_NMAX_BFP32()) then
if FPSCR.OE = 0 then
- if x.sign then
- if rmode=0b00 then r <- bfp_INFINITY()
- if rmode=0b01 then r <- bfp_NMAX_BFP32()
- if rmode=0b10 then r <- bfp_NMAX_BFP32()
- if rmode=0b11 then r <- bfp_INFINITY()
- else
- if rmode=0b00 then r <- bfp_INFINITY()
- if rmode=0b01 then r <- bfp_NMAX_BFP32()
- if rmode=0b10 then r <- bfp_INFINITY()
- if rmode=0b11 then r <- bfp_NMAX_BFP32()
+ if rmode=0b00 then r <- x.sign ? bfp_INFINITY() : bfp_INFINITY()
+ if rmode=0b01 then r <- x.sign ? bfp_NMAX_BFP32() : bfp_NMAX_BFP32()
+ if rmode=0b10 then r <- x.sign ? bfp_NMAX_BFP32() : bfp_INFINITY()
+ if rmode=0b11 then r <- x.sign ? bfp_INFINITY() : bfp_NMAX_BFP32()
r.sign <- x.sign
ox_flag <- 0b1
xx_flag <- 0b1