A relaxation is a less restrictive set of rules that are either chosen or exists natively in some environments. If a program runs well in a complete environment, it will also run in a relaxed environment.
It is recommended to develop and test a program in a complete environment. Then, after the program is done and ready to ship, it can be executed on a relaxed environment either because the user simply only has a reduced environment, or because of speed of execution. If a program has been thoroughly tested, and is known to be quite robust, then the additional checking is unecessary.
- Binary Relaxation
- Exception Relaxation
With binary relaxation, the decimal type is replaced with a binary type that contains the range of the decimal type.
The overflow exception is then instead caused at the new bounds.
Binary64 (or Double Precision) Binary Relaxation
The decimal variable type is a fractional, floating point 15 decimal digits fraction (mantissa), 2 decimal digit exponent. With binary relaxation, this type is, for example, replaced by double precision IEEE 754, also called binary64. This type has 52 bit fraction (mantissa), which can represent 15 to 17 decimal digits, and a 11 bit exponent, which can represent 3 decimal digits.
For more information on the double precision or Binary64 type, see double precision.
|min positive (normal*)||
|min positive (denormal*)||
|max negative (normal*)||
|max positive (denormal*)||
|smallest change||See the Binary64 documentation from IEEE|
* Denormal is an optional mode of Binary64 (or double precision). If denormal is turned off, the mode is called normal.
Note on special values
|Can be Not a Number (
|Can be Infinity?||Yes|
|Can be Negative Infinity?||Yes|
|Can be Undefined or Null?||No|
|Can be negative zero?||Yes|
An operator is replaced by one that does not throw exceptions.
An overflow exception can be replaced by, for example, returning
NaN. These are not values supported in the ProgsBase system.
An invalid operand exception can be replaced by returning, for example,
NaN, 0 or 1.
NaN are not values supported in the ProgsBase system.
Out of bounds
An out of bounds exception can be replaced by returning, for example,
undefined. These are not values supported in the ProgsBase system.