-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E4M3: Handle encoding of out-of-bounds and ieee values
- Loading branch information
1 parent
ff843fe
commit e9fa8eb
Showing
8 changed files
with
125 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Arguments: -fe4m3 -- -448.0001 | ||
Exit code: ExitSuccess | ||
Satisfiable. Model: | ||
ENCODED = NaN :: E4M3 | ||
7 6543 210 | ||
S -E4- S3- | ||
Binary layout: 0 1111 111 | ||
Hex layout: 7F | ||
Precision: 4 exponent bits, 3 significand bits | ||
Sign: Positive | ||
Exponent: 8 (Stored: 15, Bias: 7) | ||
Classification: FP_NAN (Quiet) | ||
Value: NaN | ||
Note: The input value -448.0001 is out of bounds, and hence becomes NaN | ||
The representable range is [-448, 448] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Arguments: -fe4m3 -- 448.0001 | ||
Exit code: ExitSuccess | ||
Satisfiable. Model: | ||
ENCODED = NaN :: E4M3 | ||
7 6543 210 | ||
S -E4- S3- | ||
Binary layout: 0 1111 111 | ||
Hex layout: 7F | ||
Precision: 4 exponent bits, 3 significand bits | ||
Sign: Positive | ||
Exponent: 8 (Stored: 15, Bias: 7) | ||
Classification: FP_NAN (Quiet) | ||
Value: NaN | ||
Note: The input value 448.0001 is out of bounds, and hence becomes NaN | ||
The representable range is [-448, 448] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Arguments: -fe4m3 -- -239.9999 | ||
Exit code: ExitSuccess | ||
Satisfiable. Model: | ||
ENCODED = -240 :: E4M3 | ||
7 6543 210 | ||
S -E4- S3- | ||
Binary layout: 1 1110 111 | ||
Hex layout: F7 | ||
Precision: 4 exponent bits, 3 significand bits | ||
Sign: Negative | ||
Exponent: 7 (Stored: 14, Bias: 7) | ||
Classification: FP_NORMAL | ||
Binary: -0b1.111p7 | ||
Octal: -0o3.6p6 | ||
Decimal: -240 | ||
Hex: -0xfp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Arguments: -fe4m3 -- 239.9999 | ||
Exit code: ExitSuccess | ||
Satisfiable. Model: | ||
ENCODED = 240 :: E4M3 | ||
7 6543 210 | ||
S -E4- S3- | ||
Binary layout: 0 1110 111 | ||
Hex layout: 77 | ||
Precision: 4 exponent bits, 3 significand bits | ||
Sign: Positive | ||
Exponent: 7 (Stored: 14, Bias: 7) | ||
Classification: FP_NORMAL | ||
Binary: 0b1.111p7 | ||
Octal: 0o3.6p6 | ||
Decimal: 240 | ||
Hex: 0xfp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Arguments: -fe4m3 -- 0 | ||
Exit code: ExitSuccess | ||
Satisfiable. Model: | ||
ENCODED = 0.0 :: E4M3 | ||
7 6543 210 | ||
S -E4- S3- | ||
Binary layout: 0 0000 000 | ||
Hex layout: 00 | ||
Precision: 4 exponent bits, 3 significand bits | ||
Sign: Positive | ||
Exponent: -7 (Stored: 0, Bias: 7) | ||
Classification: FP_ZERO | ||
Binary: 0b0.0 | ||
Octal: 0o0.0 | ||
Decimal: 0.0 | ||
Hex: 0x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Arguments: -fe4m3 -- -0 | ||
Exit code: ExitSuccess | ||
Satisfiable. Model: | ||
ENCODED = -0.0 :: E4M3 | ||
7 6543 210 | ||
S -E4- S3- | ||
Binary layout: 1 0000 000 | ||
Hex layout: 80 | ||
Precision: 4 exponent bits, 3 significand bits | ||
Sign: Negative | ||
Exponent: -7 (Stored: 0, Bias: 7) | ||
Classification: FP_ZERO | ||
Binary: -0b0.0 | ||
Octal: -0o0.0 | ||
Decimal: -0.0 | ||
Hex: -0o0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters