[Notes] Floating Point Semantics in Compiler
10 Nov 2024
Floating Point Semantics
- Floating Point Algebra
- limitation Computer Representation of FP and real world Real Numbers
- Base, Precision
- infinity
- NaN
- Denormal
- SubNormal
- Normal
- Sized Zero
- Exception
- Overflow
- Underflow
- Divide by zero
- Invalid
- Inexact
- Exception
- Traps and floating point status register
- Rounding Errors
- Important because results need to be consistent across machines
- Relative Error Method (IEEE FP standard)
- ULP Method
- Rounding Modes
- Nearest
- Positive INF
- Negative INF
- Zero
- IEEE 754 compliance
- FP model
- Fast Math
Reference