Rounding Direction Attributes IEEE 754-2008 requires that the following be correctly rounded:
- Arithmetic operations:
- Addition
- Multiplication
- Subtraction
- Division
- FMA
- Unary Operations:
- Square root
- Supported format conversions
The standard does not require round ties to away for binary formats, but it does for decimal formats. For binary formats, round ties to even must be the default rounding mode. It is recommended, but not required, to be the default for decimal. Preferred Width Attributes Suppose you are doing a computation that will have intermediate values (e.g. \((a+b)c/d\)). What should the width of the intermediate results be?
The standard recommends the following two attributes be defined:
- preferredWidthNone attribute: Use the maximum width of all the operands
- preferredWidthFormat attribute: Use the user provided one or the max width of all operands (whichever is larger). Value Changing Optimization Attributes
Some optimizations can affect portability (e.g. if the user has \(ab+cd\), should that be optimized to \(\FMA(a,b,cd)\)?). There should be attributes allowing or disallowing these. Reproducibility Attributes Conforming language standards must have ways of specifying that reproducibility is required.
- Execution behavior must preserve the literal meaning of the source code
- Any types of serializing (i.e. converting to strings) should not bound the maximum precision.
- The user must be warned if reproducibility cannot be guaranteed.
- Only the default exception handling is allowed.