Please sign in to comment.
Interpreter: Unset FPSCR.FI and FPSCR.FR for QNaN and infinity input …
…operands This hardware behavior makes sense, as the FI bit is used to signify an inexact result. An inexact result is a form of value that results during the rounding phase of denormalization. If any bits of the significand are lost during said rounding, then the result is considered to be inexact. However NaN and infinity are not classed as subnormals and therefore don't undergo the denormalization step, making loss of precision not possible (in NaN's case, numerically rounding something that is literally Not a Number doesn't even make sense). FR is set to indicate whether or not the last arithmetic or rounding and conversion instruction that rounded the intermediate result incremented the fractional portion of the result. Given neither input types would be affected by this, this should also be unset. This corrects more of the exceptional case handling for these values to match hardware.
- Loading branch information...
Showing with 40 additions and 40 deletions.