aboutsummaryrefslogtreecommitdiff
path: root/chapters/introduction.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2022-03-11 15:12:38 -0800
committerEric Kunze <eric.kunze@arm.com>2022-03-15 13:40:39 -0700
commitce6e02cec3a06d991e112f0f875123f1d1f928dc (patch)
tree7f2f6aba746321c9b14af6287157db782d7c6c22 /chapters/introduction.adoc
parent2ff79fe6b31f41685cf2cecfca5410db40440aaf (diff)
downloadspecification-ce6e02cec3a06d991e112f0f875123f1d1f928dc.tar.gz
Update floating point edge cases
Cover cases where NaN, +/- 0, +/- infinity are involved Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1a5a23c7b856ddb997f7cdc00282420294ef3e6d
Diffstat (limited to 'chapters/introduction.adoc')
-rw-r--r--chapters/introduction.adoc15
1 files changed, 13 insertions, 2 deletions
diff --git a/chapters/introduction.adoc b/chapters/introduction.adoc
index 2827399..fe4f724 100644
--- a/chapters/introduction.adoc
+++ b/chapters/introduction.adoc
@@ -351,7 +351,7 @@ Most operations in TOSA do not contain quantization scaling in the operation, bu
The apply_scale functions provide a scaling of approximately (multiplier * 2^-shift^).
The shift and value range is limited to allow a variety of implementations.
The limit of 62 on shift allows the shift to be decomposed as two right shifts of 31.
-The limit on value allows implementations that left shift the value before the mutliply in the case of shifts of 32 or less.
+The limit on value allows implementations that left shift the value before the multiply in the case of shifts of 32 or less.
For example, in the case shift=30 an implementation of the form ((value\<<2) * multiplier + round)>>32 can be used.
A scaling range of 2^+12^ down to 2^-32^ is supported for both functions with a normalized multiplier.
@@ -482,12 +482,23 @@ These features ensure that detection of overflow and other exceptional condition
|===
|Case|Result
-|Any input operand is a NaN | a NaN
+|Operators other than explicitly mentioned by other rules: Any input operand is a NaN | a NaN
+|Comparisons (EQUAL, GREATER, GREATER_EQUAL), where either or both operands is NaN | False
+
+|Comparisons ignore the sign of 0|
+
+|RSQRT (reciprocal square root) of negative numbers | a NaN
|(&#177; 0) &#215; (&#177; infinity), (&#177; infinity) &#215; (&#177; 0) | a NaN
+|LOG of negative numbers | a NaN
+
+|nonzero numbers / (&#177; 0) | (&#177; infinity)
+
|(&#177; 0) / (&#177; 0), (&#177; infinity) / (&#177; infinity) | a NaN
+|(&#177; infinity) * 0 | a NaN
+
| (+infinity) - (+infinity), (+infinity) + (-infinity) | a NaN
| Any positive overflow | + infinity