diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,8 +1,21 @@
 * Hackage: <http://hackage.haskell.org/package/crackNum>
 * GitHub:  <http://github.com/LeventErkok/crackNum/>
 
-* Latest Hackage released version: 4.6, 2026-09-03
+* Latest Hackage released version: 4.7, 2026-09-04
 
+### Version 4.7, 2026-09-04
+
+  * Encoding now applies the selected rounding mode directly to the input value.
+    Single- and double-precision decimal inputs previously went through Haskell's
+    default round-to-nearest conversion first, E4M3 used round-to-nearest in its
+    ordinary range, and exact decimal or hexadecimal inputs to the small AI formats
+    could be rounded twice. These cases can now produce different, correctly rounded
+    bit patterns for `RNA`, `RTP`, `RTN`, and `RTZ`, and near exact midpoints.
+
+  * Corrected directed rounding for E4M3 values between 240 and 448 (and their
+    negative counterparts). The implementation previously chose the nearest value
+    first and consulted the rounding mode only on exact ties.
+
 ### Version 4.6, 2026-09-03
 
   * New floating-point format: UE5M3, selected with `-fue5m3`. This is the unsigned
@@ -12,23 +25,6 @@
     exponent bit is what the format is for: it drops the smallest non-zero value from
     `E4M3`'s 2^-9 to the subnormal 2^-17, so a block of small-magnitude elements gets
     a scale that can actually represent it.
-
-  * Being a variant of `E4M3`, UE5M3 inherits its deviations from IEEE rather than the
-    IEEE reading of the same field widths: there are no infinities, and the all-ones
-    pattern is the one and only NaN. Having no sign bit, that is a single pattern
-    (`0xFF`) where `E4M3` has one per sign. The rest of the top binade therefore stays
-    finite, so the largest representable value is 114688 -- `E4M3`'s 448 carried up the
-    eight binades the extra exponent bit buys -- and not the 61440 an IEEE format of
-    this shape would stop at. Below that it is ordinary: zero, subnormals, and normals
-    all behave as IEEE says, with a bias of 15.
-
-  * Negative inputs are rejected rather than clamped. With no sign bit there is no
-    direction to saturate towards, and clamping would quietly turn the value positive;
-    this is the same call `E8M0` already makes, and it applies to a negative zero too.
-    Values above the range become NaN, following `E4M3`, which likewise has no infinity
-    to saturate to.
-
-  * All four GUIs offer the new format, in the "AI formats" group.
 
 ### Version 4.5, 2026-09-01
 
diff --git a/Golds/badInvocation0.gold b/Golds/badInvocation0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/badInvocation0.gold
@@ -0,0 +1,6 @@
+Arguments: -f3+4 0b01
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  Input needs to be 7 bits wide, it's too short by 5 bits
diff --git a/Golds/badInvocation1.gold b/Golds/badInvocation1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/badInvocation1.gold
@@ -0,0 +1,6 @@
+Arguments: -f3+4 0xFFFF
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  Input needs to be 7 bits wide, it's too long by 9 bits
diff --git a/Golds/badInvocation2.gold b/Golds/badInvocation2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/badInvocation2.gold
@@ -0,0 +1,8 @@
+Arguments: -f3+1 0.5
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  The solver does not support this format:
+    3 exponent bits, 1 significand bit
+  z3 requires at least 2 of each.
diff --git a/Golds/badInvocation3.gold b/Golds/badInvocation3.gold
new file mode 100644
--- /dev/null
+++ b/Golds/badInvocation3.gold
@@ -0,0 +1,8 @@
+Arguments: -f1+3 0b0000
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  The solver does not support this format:
+    1 exponent bit, 3 significand bits
+  z3 requires at least 2 of each.
diff --git a/Golds/decode0.gold b/Golds/decode0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode0.gold
@@ -0,0 +1,13 @@
+Arguments: -i4       0b0110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 6 :: IntN 4
+                  3210
+   Binary layout: 0110
+      Hex layout: 6
+            Type: Signed 4-bit 2's complement integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
diff --git a/Golds/decode1.gold b/Golds/decode1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode1.gold
@@ -0,0 +1,12 @@
+Arguments: -w4       0xE
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 14 :: WordN 4
+                  3210
+   Binary layout: 1110
+      Hex layout: E
+            Type: Unsigned 4-bit word
+          Binary: 0b1110
+           Octal: 0o16
+         Decimal: 14
+             Hex: 0xe
diff --git a/Golds/decode10.gold b/Golds/decode10.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode10.gold
@@ -0,0 +1,17 @@
+Arguments: -ftf32 0b0_10000000_0100000000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 2.5 :: FloatingPoint 8 11
+                  1          0
+                  8 76543210 9876543210
+                  S ---E8--- ---S10----
+   Binary layout: 0 10000000 0100000000
+      Hex layout: 2 0100
+       Precision: 8 exponent bits, 10 significand bits
+            Sign: Positive
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
diff --git a/Golds/decode2.gold b/Golds/decode2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode2.gold
@@ -0,0 +1,14 @@
+Arguments: -f3+4     0b0111001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 3 4
+                  6 543 210
+                  S E3- S3-
+   Binary layout: 0 111 001
+      Hex layout: 39
+       Precision: 3 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 4 (Stored: 7, Bias: 3)
+  Classification: FP_NAN (Signaling)
+           Value: NaN
+            Note: Representation for NaN's is not unique
diff --git a/Golds/decode3.gold b/Golds/decode3.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode3.gold
@@ -0,0 +1,17 @@
+Arguments: -fbp      0x000F
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.37753e-39 :: FloatingPoint 8 8
+                  1      0
+                  5 43210987 6543210
+                  S ---E8--- --S7---
+   Binary layout: 0 00000000 0001111
+      Hex layout: 000F
+       Precision: 8 exponent bits, 7 significand bits
+            Sign: Positive
+        Exponent: -126 (Subnormal, with fixed exponent value. Stored: 0, Bias: 127)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1.111p-130
+           Octal: 0o7.4p-132
+         Decimal: 1.37753e-39
+             Hex: 0x7.8p-132
diff --git a/Golds/decode4.gold b/Golds/decode4.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode4.gold
@@ -0,0 +1,17 @@
+Arguments: -fdp      0x8000000000000000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -0.0 :: Double
+                  6    5          4         3         2         1         0
+                  3 21098765432 1098765432109876543210987654321098765432109876543210
+                  S ----E11---- ------------------------S52-------------------------
+   Binary layout: 1 00000000000 0000000000000000000000000000000000000000000000000000
+      Hex layout: 8000 0000 0000 0000
+       Precision: Double
+            Sign: Negative
+        Exponent: -1023 (Stored: 0, Bias: 1023)
+  Classification: FP_ZERO
+          Binary: -0b0.0
+           Octal: -0o0.0
+         Decimal: -0.0
+             Hex: -0o0
diff --git a/Golds/decode5.gold b/Golds/decode5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode5.gold
@@ -0,0 +1,15 @@
+Arguments: -fhp      0x7c01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 0 11111 0000000001
+      Hex layout: 7C01
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Positive
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN (Signaling)
+           Value: NaN
+            Note: Representation for NaN's is not unique
diff --git a/Golds/decode6.gold b/Golds/decode6.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode6.gold
@@ -0,0 +1,120 @@
+Arguments: -fhp  -l8 128'hffffffffffffffffbdffaaffdc71fc60
+Exit code: ExitSuccess
+== Lane 7 ============================================================
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 11111 1111111111
+      Hex layout: FFFF
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+== Lane 6 ============================================================
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 11111 1111111111
+      Hex layout: FFFF
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+== Lane 5 ============================================================
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 11111 1111111111
+      Hex layout: FFFF
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+== Lane 4 ============================================================
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 11111 1111111111
+      Hex layout: FFFF
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+== Lane 3 ============================================================
+Satisfiable. Model:
+  DECODED = -1.4990234 :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 01111 0111111111
+      Hex layout: BDFF
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: -0b1.0111111111
+           Octal: -0o1.3774
+         Decimal: -1.4990234
+             Hex: -0x1.7fc
+== Lane 2 ============================================================
+Satisfiable. Model:
+  DECODED = -0.054656982 :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 01010 1011111111
+      Hex layout: AAFF
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: -5 (Stored: 10, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: -0b1.1011111111p-5
+           Octal: -0o3.377p-6
+         Decimal: -0.054656982
+             Hex: -0xd.fep-8
+== Lane 1 ============================================================
+Satisfiable. Model:
+  DECODED = -284.25 :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 10111 0001110001
+      Hex layout: DC71
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 8 (Stored: 23, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: -0b1.0001110001p8
+           Octal: -0o4.342p6
+         Decimal: -284.25
+             Hex: -0x1.1c4p8
+== Lane 0 ============================================================
+Satisfiable. Model:
+  DECODED = NaN :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 1 11111 0001100000
+      Hex layout: FC60
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Negative
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN (Signaling)
+           Value: NaN
+            Note: Representation for NaN's is not unique
diff --git a/Golds/decode7.gold b/Golds/decode7.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode7.gold
@@ -0,0 +1,16 @@
+Arguments: -fe5m2    0b01111011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 57300 :: E5M2
+                  7 65432 10
+                  S -E5-- S2
+   Binary layout: 0 11110 11
+      Hex layout: 7B
+       Precision: 5 exponent bits, 2 significand bits
+            Sign: Positive
+        Exponent: 15 (Stored: 30, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p15
+           Octal: 0o1.6p15
+         Decimal: 57300
+             Hex: 0xep12
diff --git a/Golds/decode8.gold b/Golds/decode8.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode8.gold
@@ -0,0 +1,12 @@
+Arguments: -w2 -rRNE 2'h1
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1 :: WordN 2
+                  10
+   Binary layout: 01
+      Hex layout: 1
+            Type: Unsigned 2-bit word
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1
+             Hex: 0x1
diff --git a/Golds/decode9.gold b/Golds/decode9.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decode9.gold
@@ -0,0 +1,17 @@
+Arguments: -ftf32 19'h0000F
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.7219156e-40 :: FloatingPoint 8 11
+                  1          0
+                  8 76543210 9876543210
+                  S ---E8--- ---S10----
+   Binary layout: 0 00000000 0000001111
+      Hex layout: 0 000F
+       Precision: 8 exponent bits, 10 significand bits
+            Sign: Positive
+        Exponent: -126 (Subnormal, with fixed exponent value. Stored: 0, Bias: 127)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1.111p-133
+           Octal: 0o7.4p-135
+         Decimal: 1.7219156e-40
+             Hex: 0xfp-136
diff --git a/Golds/decodeE4M3_+NaN.gold b/Golds/decodeE4M3_+NaN.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_+NaN.gold
@@ -0,0 +1,14 @@
+Arguments: -fe4m3 0b_0111_1111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 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: Representation for NaN's is not unique
diff --git a/Golds/decodeE4M3_-256.gold b/Golds/decodeE4M3_-256.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-256.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 000
+      Hex layout: F8
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1p+8
+           Octal: -0o4p+6
+         Decimal: -256.0
+             Hex: -0x1p+8
diff --git a/Golds/decodeE4M3_-288.gold b/Golds/decodeE4M3_-288.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-288.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -288.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 001
+      Hex layout: F9
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.001p+8
+           Octal: -0o4.4p+6
+         Decimal: -288.0
+             Hex: -0x1.2p+8
diff --git a/Golds/decodeE4M3_-320.gold b/Golds/decodeE4M3_-320.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-320.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111010
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -320.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 010
+      Hex layout: FA
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.01p+8
+           Octal: -0o5p+6
+         Decimal: -320.0
+             Hex: -0x1.4p+8
diff --git a/Golds/decodeE4M3_-352.gold b/Golds/decodeE4M3_-352.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-352.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -352.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 011
+      Hex layout: FB
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.011p+8
+           Octal: -0o5.4p+6
+         Decimal: -352.0
+             Hex: -0x1.6p+8
diff --git a/Golds/decodeE4M3_-384.gold b/Golds/decodeE4M3_-384.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-384.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -384.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 100
+      Hex layout: FC
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+8
+           Octal: -0o6p+6
+         Decimal: -384.0
+             Hex: -0x1.8p+8
diff --git a/Golds/decodeE4M3_-416.gold b/Golds/decodeE4M3_-416.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-416.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111101
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: FD
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.ap+8
diff --git a/Golds/decodeE4M3_-448.gold b/Golds/decodeE4M3_-448.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-448.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b11111110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 110
+      Hex layout: FE
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.11p+8
+           Octal: -0o7p+6
+         Decimal: -448.0
+             Hex: -0x1.cp+8
diff --git a/Golds/decodeE4M3_-NaN.gold b/Golds/decodeE4M3_-NaN.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_-NaN.gold
@@ -0,0 +1,14 @@
+Arguments: -fe4m3 0b_1111_1111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = NaN :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 111
+      Hex layout: FF
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
diff --git a/Golds/decodeE4M3_256.gold b/Golds/decodeE4M3_256.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_256.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 000
+      Hex layout: 78
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1p+8
+           Octal: 0o4p+6
+         Decimal: 256.0
+             Hex: 0x1p+8
diff --git a/Golds/decodeE4M3_288.gold b/Golds/decodeE4M3_288.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_288.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 288.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 001
+      Hex layout: 79
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.001p+8
+           Octal: 0o4.4p+6
+         Decimal: 288.0
+             Hex: 0x1.2p+8
diff --git a/Golds/decodeE4M3_320.gold b/Golds/decodeE4M3_320.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_320.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111010
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 320.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 010
+      Hex layout: 7A
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p+8
+           Octal: 0o5p+6
+         Decimal: 320.0
+             Hex: 0x1.4p+8
diff --git a/Golds/decodeE4M3_352.gold b/Golds/decodeE4M3_352.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_352.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 352.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 011
+      Hex layout: 7B
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.011p+8
+           Octal: 0o5.4p+6
+         Decimal: 352.0
+             Hex: 0x1.6p+8
diff --git a/Golds/decodeE4M3_384.gold b/Golds/decodeE4M3_384.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_384.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 384.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 100
+      Hex layout: 7C
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+8
+           Octal: 0o6p+6
+         Decimal: 384.0
+             Hex: 0x1.8p+8
diff --git a/Golds/decodeE4M3_416.gold b/Golds/decodeE4M3_416.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_416.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111101
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7D
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.ap+8
diff --git a/Golds/decodeE4M3_448.gold b/Golds/decodeE4M3_448.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_448.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01111110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 110
+      Hex layout: 7E
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+8
+           Octal: 0o7p+6
+         Decimal: 448.0
+             Hex: 0x1.cp+8
diff --git a/Golds/decodeE4M3_regular_00000000.gold b/Golds/decodeE4M3_regular_00000000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_regular_00000000.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b00000000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 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
diff --git a/Golds/decodeE4M3_regular_00000001.gold b/Golds/decodeE4M3_regular_00000001.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_regular_00000001.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b00000001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.001953 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 0000 001
+      Hex layout: 01
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: -6 (Subnormal, with fixed exponent value. Stored: 0, Bias: 7)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-9
+           Octal: 0o1p-9
+         Decimal: 0.001953
+             Hex: 0x8p-12
diff --git a/Golds/decodeE4M3_regular_00111000.gold b/Golds/decodeE4M3_regular_00111000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_regular_00111000.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b00111000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 0111 000
+      Hex layout: 38
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 0 (Stored: 7, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
diff --git a/Golds/decodeE4M3_regular_01110111.gold b/Golds/decodeE4M3_regular_01110111.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_regular_01110111.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b01110111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 240.0 :: 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.0
+             Hex: 0xfp4
diff --git a/Golds/decodeE4M3_regular_10000000.gold b/Golds/decodeE4M3_regular_10000000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_regular_10000000.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b10000000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -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
diff --git a/Golds/decodeE4M3_regular_10111100.gold b/Golds/decodeE4M3_regular_10111100.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE4M3_regular_10111100.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 0b10111100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -1.5 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 0111 100
+      Hex layout: BC
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 0 (Stored: 7, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.1
+           Octal: -0o1.4
+         Decimal: -1.5
+             Hex: -0x1.8
diff --git a/Golds/decodeE8M0_00.gold b/Golds/decodeE8M0_00.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_00.gold
@@ -0,0 +1,16 @@
+Arguments: -fe8m0 0x00
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 5.877471754111438e-39 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 00000000
+      Hex layout: 00
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -127 (Stored: 0, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-127
+           Octal: 0o4p-129
+         Decimal: 5.877471754111438e-39
+             Hex: 0x2p-128
diff --git a/Golds/decodeE8M0_01.gold b/Golds/decodeE8M0_01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_01.gold
@@ -0,0 +1,16 @@
+Arguments: -fe8m0 0x01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.1754943508222875e-38 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 00000001
+      Hex layout: 01
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -126 (Stored: 1, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-126
+           Octal: 0o1p-126
+         Decimal: 1.1754943508222875e-38
+             Hex: 0x4p-128
diff --git a/Golds/decodeE8M0_7F.gold b/Golds/decodeE8M0_7F.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_7F.gold
@@ -0,0 +1,16 @@
+Arguments: -fe8m0 0x7F
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111111
+      Hex layout: 7F
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 127, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
diff --git a/Golds/decodeE8M0_80.gold b/Golds/decodeE8M0_80.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_80.gold
@@ -0,0 +1,16 @@
+Arguments: -fe8m0 0x80
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
diff --git a/Golds/decodeE8M0_FD.gold b/Golds/decodeE8M0_FD.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_FD.gold
@@ -0,0 +1,16 @@
+Arguments: -fe8m0 0xFD
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 8.507059173023462e37 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111101
+      Hex layout: FD
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 126 (Stored: 253, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+126
+           Octal: 0o1p+126
+         Decimal: 8.507059173023462e37
+             Hex: 0x4p+124
diff --git a/Golds/decodeE8M0_FE.gold b/Golds/decodeE8M0_FE.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_FE.gold
@@ -0,0 +1,16 @@
+Arguments: -fe8m0 0xFE
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.7014118346046923e38 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111110
+      Hex layout: FE
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 127 (Stored: 254, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+127
+           Octal: 0o2p+126
+         Decimal: 1.7014118346046923e38
+             Hex: 0x8p+124
diff --git a/Golds/decodeE8M0_FF.gold b/Golds/decodeE8M0_FF.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeE8M0_FF.gold
@@ -0,0 +1,13 @@
+Arguments: -fe8m0 0xFF
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = NaN :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111111
+      Hex layout: FF
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_NAN
+           Value: NaN
diff --git a/Golds/decodeFP4E0M3_0000.gold b/Golds/decodeFP4E0M3_0000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0000.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 000
+      Hex layout: 0
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b0
+           Octal: 0o0
+         Decimal: 0
+             Hex: 0x0
diff --git a/Golds/decodeFP4E0M3_0001.gold b/Golds/decodeFP4E0M3_0001.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0001.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 001
+      Hex layout: 1
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1
+             Hex: 0x1
diff --git a/Golds/decodeFP4E0M3_0010.gold b/Golds/decodeFP4E0M3_0010.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0010.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0010
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
diff --git a/Golds/decodeFP4E0M3_0011.gold b/Golds/decodeFP4E0M3_0011.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0011.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 011
+      Hex layout: 3
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b11
+           Octal: 0o3
+         Decimal: 3
+             Hex: 0x3
diff --git a/Golds/decodeFP4E0M3_0100.gold b/Golds/decodeFP4E0M3_0100.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0100.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
diff --git a/Golds/decodeFP4E0M3_0101.gold b/Golds/decodeFP4E0M3_0101.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0101.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0101
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 101
+      Hex layout: 5
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b101
+           Octal: 0o5
+         Decimal: 5
+             Hex: 0x5
diff --git a/Golds/decodeFP4E0M3_0110.gold b/Golds/decodeFP4E0M3_0110.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0110.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
diff --git a/Golds/decodeFP4E0M3_0111.gold b/Golds/decodeFP4E0M3_0111.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_0111.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b0111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
diff --git a/Golds/decodeFP4E0M3_1000.gold b/Golds/decodeFP4E0M3_1000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1000.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 000
+      Hex layout: 8
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b0
+           Octal: -0o0
+         Decimal: -0
+             Hex: -0x0
diff --git a/Golds/decodeFP4E0M3_1001.gold b/Golds/decodeFP4E0M3_1001.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1001.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 001
+      Hex layout: 9
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1
+             Hex: -0x1
diff --git a/Golds/decodeFP4E0M3_1010.gold b/Golds/decodeFP4E0M3_1010.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1010.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1010
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
diff --git a/Golds/decodeFP4E0M3_1011.gold b/Golds/decodeFP4E0M3_1011.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1011.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 011
+      Hex layout: B
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b11
+           Octal: -0o3
+         Decimal: -3
+             Hex: -0x3
diff --git a/Golds/decodeFP4E0M3_1100.gold b/Golds/decodeFP4E0M3_1100.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1100.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
diff --git a/Golds/decodeFP4E0M3_1101.gold b/Golds/decodeFP4E0M3_1101.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1101.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1101
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 101
+      Hex layout: D
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b101
+           Octal: -0o5
+         Decimal: -5
+             Hex: -0x5
diff --git a/Golds/decodeFP4E0M3_1110.gold b/Golds/decodeFP4E0M3_1110.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1110.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
diff --git a/Golds/decodeFP4E0M3_1111.gold b/Golds/decodeFP4E0M3_1111.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4E0M3_1111.gold
@@ -0,0 +1,14 @@
+Arguments: -ffp4e0m3 0b1111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
diff --git a/Golds/decodeFP4_0000.gold b/Golds/decodeFP4_0000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0000.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 0
+      Hex layout: 0
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
diff --git a/Golds/decodeFP4_0001.gold b/Golds/decodeFP4_0001.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0001.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 1
+      Hex layout: 1
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
diff --git a/Golds/decodeFP4_0010.gold b/Golds/decodeFP4_0010.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0010.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0010
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
diff --git a/Golds/decodeFP4_0011.gold b/Golds/decodeFP4_0011.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0011.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 1
+      Hex layout: 3
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1
+           Octal: 0o1.4
+         Decimal: 1.5
+             Hex: 0x1.8
diff --git a/Golds/decodeFP4_0100.gold b/Golds/decodeFP4_0100.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0100.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
diff --git a/Golds/decodeFP4_0101.gold b/Golds/decodeFP4_0101.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0101.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0101
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 1
+      Hex layout: 5
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p1
+           Octal: 0o3
+         Decimal: 3.0
+             Hex: 0x3
diff --git a/Golds/decodeFP4_0110.gold b/Golds/decodeFP4_0110.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0110.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
diff --git a/Golds/decodeFP4_0111.gold b/Golds/decodeFP4_0111.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_0111.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b0111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
diff --git a/Golds/decodeFP4_1000.gold b/Golds/decodeFP4_1000.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1000.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1000
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 0
+      Hex layout: 8
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: -0b0.0
+           Octal: -0o0.0
+         Decimal: -0.0
+             Hex: -0o0
diff --git a/Golds/decodeFP4_1001.gold b/Golds/decodeFP4_1001.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1001.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1001
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 1
+      Hex layout: 9
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: -0b1p-1
+           Octal: -0o4p-3
+         Decimal: -0.5
+             Hex: -0x8p-4
diff --git a/Golds/decodeFP4_1010.gold b/Golds/decodeFP4_1010.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1010.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1010
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
diff --git a/Golds/decodeFP4_1011.gold b/Golds/decodeFP4_1011.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1011.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1011
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 1
+      Hex layout: B
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1
+           Octal: -0o1.4
+         Decimal: -1.5
+             Hex: -0x1.8
diff --git a/Golds/decodeFP4_1100.gold b/Golds/decodeFP4_1100.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1100.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
diff --git a/Golds/decodeFP4_1101.gold b/Golds/decodeFP4_1101.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1101.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1101
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 1
+      Hex layout: D
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p1
+           Octal: -0o3
+         Decimal: -3.0
+             Hex: -0x3
diff --git a/Golds/decodeFP4_1110.gold b/Golds/decodeFP4_1110.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1110.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1110
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
diff --git a/Golds/decodeFP4_1111.gold b/Golds/decodeFP4_1111.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeFP4_1111.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4 0b1111
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
diff --git a/Golds/decodeUE5M3_00.gold b/Golds/decodeUE5M3_00.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_00.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0x00
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 000
+      Hex layout: 00
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -15 (Stored: 0, Bias: 15)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
diff --git a/Golds/decodeUE5M3_01.gold b/Golds/decodeUE5M3_01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_01.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0x01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.000007629 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 001
+      Hex layout: 01
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-17
+           Octal: 0o2p-18
+         Decimal: 0.000007629
+             Hex: 0x8p-20
diff --git a/Golds/decodeUE5M3_07.gold b/Golds/decodeUE5M3_07.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_07.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0x07
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.00005341 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 111
+      Hex layout: 07
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1.11p-15
+           Octal: 0o1.6p-15
+         Decimal: 0.00005341
+             Hex: 0x3.8p-16
diff --git a/Golds/decodeUE5M3_08.gold b/Golds/decodeUE5M3_08.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_08.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0x08
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 0.00006104 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00001 000
+      Hex layout: 08
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Stored: 1, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p-14
+           Octal: 0o2p-15
+         Decimal: 0.00006104
+             Hex: 0x4p-16
diff --git a/Golds/decodeUE5M3_78.gold b/Golds/decodeUE5M3_78.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_78.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0x78
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 1.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 000
+      Hex layout: 78
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
diff --git a/Golds/decodeUE5M3_F7.gold b/Golds/decodeUE5M3_F7.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_F7.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0xF7
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 61440 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11110 111
+      Hex layout: F7
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 15 (Stored: 30, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111p15
+           Octal: 0o1.7p15
+         Decimal: 61440
+             Hex: 0xfp12
diff --git a/Golds/decodeUE5M3_F8.gold b/Golds/decodeUE5M3_F8.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_F8.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0xF8
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
diff --git a/Golds/decodeUE5M3_FB.gold b/Golds/decodeUE5M3_FB.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_FB.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0xFB
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 90112.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 011
+      Hex layout: FB
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.011p+16
+           Octal: 0o2.6p+15
+         Decimal: 90112.0
+             Hex: 0x1.6p+16
diff --git a/Golds/decodeUE5M3_FE.gold b/Golds/decodeUE5M3_FE.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_FE.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 0xFE
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = 114688.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 110
+      Hex layout: FE
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+16
+           Octal: 0o3.4p+15
+         Decimal: 114688.0
+             Hex: 0x1.cp+16
diff --git a/Golds/decodeUE5M3_FF.gold b/Golds/decodeUE5M3_FF.gold
new file mode 100644
--- /dev/null
+++ b/Golds/decodeUE5M3_FF.gold
@@ -0,0 +1,13 @@
+Arguments: -fue5m3 0xFF
+Exit code: ExitSuccess
+Satisfiable. Model:
+  DECODED = NaN :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 111
+      Hex layout: FF
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN
+           Value: NaN
diff --git a/Golds/encode0.gold b/Golds/encode0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode0.gold
@@ -0,0 +1,13 @@
+Arguments: -i4 -- -2
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: IntN 4
+                  3210
+   Binary layout: 1110
+      Hex layout: E
+            Type: Signed 4-bit 2's complement integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
diff --git a/Golds/encode1.gold b/Golds/encode1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode1.gold
@@ -0,0 +1,12 @@
+Arguments: -w4 2
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: WordN 4
+                  3210
+   Binary layout: 0010
+      Hex layout: 2
+            Type: Unsigned 4-bit word
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
diff --git a/Golds/encode10.gold b/Golds/encode10.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode10.gold
@@ -0,0 +1,16 @@
+Arguments: -f3+3     nan
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: FloatingPoint 3 3
+                  5 432 10
+                  S E3- S2
+   Binary layout: 0 111 10
+      Hex layout: 1E
+       Precision: 3 exponent bits, 2 significand bits
+            Sign: Positive
+        Exponent: 4 (Stored: 7, Bias: 3)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "nan" was exact. No rounding happened.
diff --git a/Golds/encode11.gold b/Golds/encode11.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode11.gold
@@ -0,0 +1,16 @@
+Arguments: -fsp  -- -inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -Infinity :: Float
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------S23----------
+   Binary layout: 1 11111111 00000000000000000000000
+      Hex layout: FF80 0000
+       Precision: Single
+            Sign: Negative
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_INFINITE
+           Value: -Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-inf" was exact. No rounding happened.
diff --git a/Golds/encode12.gold b/Golds/encode12.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode12.gold
@@ -0,0 +1,16 @@
+Arguments: -fsp  -- -infinity
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -Infinity :: Float
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------S23----------
+   Binary layout: 1 11111111 00000000000000000000000
+      Hex layout: FF80 0000
+       Precision: Single
+            Sign: Negative
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_INFINITE
+           Value: -Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-infinity" was exact. No rounding happened.
diff --git a/Golds/encode13.gold b/Golds/encode13.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode13.gold
@@ -0,0 +1,16 @@
+Arguments: -fsp      inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = Infinity :: Float
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------S23----------
+   Binary layout: 0 11111111 00000000000000000000000
+      Hex layout: 7F80 0000
+       Precision: Single
+            Sign: Positive
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_INFINITE
+           Value: Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "inf" was exact. No rounding happened.
diff --git a/Golds/encode14.gold b/Golds/encode14.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode14.gold
@@ -0,0 +1,16 @@
+Arguments: -fsp      infinity
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = Infinity :: Float
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------S23----------
+   Binary layout: 0 11111111 00000000000000000000000
+      Hex layout: 7F80 0000
+       Precision: Single
+            Sign: Positive
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_INFINITE
+           Value: Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "infinity" was exact. No rounding happened.
diff --git a/Golds/encode15.gold b/Golds/encode15.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode15.gold
@@ -0,0 +1,17 @@
+Arguments: -fsp      nan
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: Float
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------S23----------
+   Binary layout: 0 11111111 10000000000000000000000
+      Hex layout: 7FC0 0000
+       Precision: Single
+            Sign: Positive
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "nan" was exact. No rounding happened.
diff --git a/Golds/encode16.gold b/Golds/encode16.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode16.gold
@@ -0,0 +1,18 @@
+Arguments: -fe5m2 2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: E5M2
+                  7 65432 10
+                  S -E5-- S2
+   Binary layout: 0 10000 01
+      Hex layout: 41
+       Precision: 5 exponent bits, 2 significand bits
+            Sign: Positive
+        Exponent: 1 (Stored: 16, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encode17.gold b/Golds/encode17.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode17.gold
@@ -0,0 +1,17 @@
+Arguments: -fsp -- -0x2p3
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -16.0 :: FloatingPoint 8 24
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------S23----------
+   Binary layout: 1 10000011 00000000000000000000000
+      Hex layout: C180 0000
+       Precision: Single (8 exponent bits, 23 significand bits.)
+            Sign: Negative
+        Exponent: 4 (Stored: 131, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: -0b1p4
+           Octal: -0o2p3
+         Decimal: -16.0
+             Hex: -0x1p4
diff --git a/Golds/encode18.gold b/Golds/encode18.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode18.gold
@@ -0,0 +1,17 @@
+Arguments: -fdp -- 0x1.3
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.1875 :: FloatingPoint 11 53
+                  6     5          4         3         2         1         0
+                  4 32109876543 21098765432109876543210987654321098765432109876543210
+                  S ----E11---- -------------------------S53-------------------------
+   Binary layout: 0 01111111111 00110000000000000000000000000000000000000000000000000
+      Hex layout: 0 7FE6 0000 0000 0000
+       Precision: 11 exponent bits, 53 significand bits
+            Sign: Positive
+        Exponent: 0 (Stored: 1023, Bias: 1023)
+  Classification: FP_NORMAL
+          Binary: 0b1.0011
+           Octal: 0o1.14
+         Decimal: 1.1875
+             Hex: 0x1.3
diff --git a/Golds/encode19.gold b/Golds/encode19.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode19.gold
@@ -0,0 +1,17 @@
+Arguments: -fhp -- 0x1.3p4
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 19.0 :: FloatingPoint 5 11
+                  1       0
+                  5 43210 9876543210
+                  S -E5-- ---S10----
+   Binary layout: 0 10011 0011000000
+      Hex layout: 4CC0
+       Precision: Half (5 exponent bits, 10 significand bits.)
+            Sign: Positive
+        Exponent: 4 (Stored: 19, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.0011p4
+           Octal: 0o2.3p3
+         Decimal: 19.0
+             Hex: 0x1.3p4
diff --git a/Golds/encode2.gold b/Golds/encode2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode2.gold
@@ -0,0 +1,18 @@
+Arguments: -f3+4 2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: FloatingPoint 3 4
+                  6 543 210
+                  S E3- S3-
+   Binary layout: 0 100 010
+      Hex layout: 22
+       Precision: 3 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 1 (Stored: 4, Bias: 3)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encode20.gold b/Golds/encode20.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode20.gold
@@ -0,0 +1,19 @@
+Arguments: -ftf32 2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: FloatingPoint 8 11
+                  1          0
+                  8 76543210 9876543210
+                  S ---E8--- ---S10----
+   Binary layout: 0 10000000 0100000000
+      Hex layout: 2 0100
+       Precision: 8 exponent bits, 10 significand bits
+            Sign: Positive
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encode21.gold b/Golds/encode21.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode21.gold
@@ -0,0 +1,16 @@
+Arguments: -ftf32 -- -inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -Infinity :: FloatingPoint 8 11
+                  1          0
+                  8 76543210 9876543210
+                  S ---E8--- ---S10----
+   Binary layout: 1 11111111 0000000000
+      Hex layout: 7 FC00
+       Precision: 8 exponent bits, 10 significand bits
+            Sign: Negative
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_INFINITE
+           Value: -Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-inf" was exact. No rounding happened.
diff --git a/Golds/encode22.gold b/Golds/encode22.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode22.gold
@@ -0,0 +1,17 @@
+Arguments: -ftf32    nan
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: FloatingPoint 8 11
+                  1          0
+                  8 76543210 9876543210
+                  S ---E8--- ---S10----
+   Binary layout: 0 11111111 1000000000
+      Hex layout: 3 FE00
+       Precision: 8 exponent bits, 10 significand bits
+            Sign: Positive
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_NAN (Quiet)
+           Value: NaN
+            Note: Representation for NaN's is not unique
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "nan" was exact. No rounding happened.
diff --git a/Golds/encode3.gold b/Golds/encode3.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode3.gold
@@ -0,0 +1,18 @@
+Arguments: -f3+4 2.5 -rRTZ
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: FloatingPoint 3 4
+                  6 543 210
+                  S E3- S3-
+   Binary layout: 0 100 010
+      Hex layout: 22
+       Precision: 3 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 1 (Stored: 4, Bias: 3)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encode4.gold b/Golds/encode4.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode4.gold
@@ -0,0 +1,19 @@
+Arguments: -fbp 2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: FloatingPoint 8 8
+                  1      0
+                  5 43210987 6543210
+                  S ---E8--- --S7---
+   Binary layout: 0 10000000 0100000
+      Hex layout: 4020
+       Precision: 8 exponent bits, 7 significand bits
+            Sign: Positive
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encode5.gold b/Golds/encode5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode5.gold
@@ -0,0 +1,19 @@
+Arguments: -fdp 2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: Double
+                  6    5          4         3         2         1         0
+                  3 21098765432 1098765432109876543210987654321098765432109876543210
+                  S ----E11---- ------------------------S52-------------------------
+   Binary layout: 0 10000000000 0100000000000000000000000000000000000000000000000000
+      Hex layout: 4004 0000 0000 0000
+       Precision: Double
+            Sign: Positive
+        Exponent: 1 (Stored: 1024, Bias: 1023)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p+1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encode6.gold b/Golds/encode6.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode6.gold
@@ -0,0 +1,15 @@
+Arguments: -f3+3 -- -inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -Infinity :: FloatingPoint 3 3
+                  5 432 10
+                  S E3- S2
+   Binary layout: 1 111 00
+      Hex layout: 3C
+       Precision: 3 exponent bits, 2 significand bits
+            Sign: Negative
+        Exponent: 4 (Stored: 7, Bias: 3)
+  Classification: FP_INFINITE
+           Value: -Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-inf" was exact. No rounding happened.
diff --git a/Golds/encode7.gold b/Golds/encode7.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode7.gold
@@ -0,0 +1,15 @@
+Arguments: -f3+3 -- -infinity
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -Infinity :: FloatingPoint 3 3
+                  5 432 10
+                  S E3- S2
+   Binary layout: 1 111 00
+      Hex layout: 3C
+       Precision: 3 exponent bits, 2 significand bits
+            Sign: Negative
+        Exponent: 4 (Stored: 7, Bias: 3)
+  Classification: FP_INFINITE
+           Value: -Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-infinity" was exact. No rounding happened.
diff --git a/Golds/encode8.gold b/Golds/encode8.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode8.gold
@@ -0,0 +1,15 @@
+Arguments: -f3+3     inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = Infinity :: FloatingPoint 3 3
+                  5 432 10
+                  S E3- S2
+   Binary layout: 0 111 00
+      Hex layout: 1C
+       Precision: 3 exponent bits, 2 significand bits
+            Sign: Positive
+        Exponent: 4 (Stored: 7, Bias: 3)
+  Classification: FP_INFINITE
+           Value: Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "inf" was exact. No rounding happened.
diff --git a/Golds/encode9.gold b/Golds/encode9.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encode9.gold
@@ -0,0 +1,15 @@
+Arguments: -f3+3     infinity
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = Infinity :: FloatingPoint 3 3
+                  5 432 10
+                  S E3- S2
+   Binary layout: 0 111 00
+      Hex layout: 1C
+       Precision: 3 exponent bits, 2 significand bits
+            Sign: Positive
+        Exponent: 4 (Stored: 7, Bias: 3)
+  Classification: FP_INFINITE
+           Value: Infinity
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "infinity" was exact. No rounding happened.
diff --git a/Golds/encodeE4M3_+inf.gold b/Golds/encodeE4M3_+inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_+inf.gold
@@ -0,0 +1,14 @@
+Arguments: -fe4m3    inf
+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 was infinite, which is not representable in E4M3.
diff --git a/Golds/encodeE4M3_-inf.gold b/Golds/encodeE4M3_-inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_-inf.gold
@@ -0,0 +1,14 @@
+Arguments: -fe4m3 -- -inf
+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 was infinite, which is not representable in E4M3.
diff --git a/Golds/encodeE4M3_bnd1.gold b/Golds/encodeE4M3_bnd1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_bnd1.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 -- -239.9999
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.0
+             Hex: -0xfp4
diff --git a/Golds/encodeE4M3_bnd2.gold b/Golds/encodeE4M3_bnd2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_bnd2.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 --  239.9999
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.0
+             Hex: 0xfp4
diff --git a/Golds/encodeE4M3_in1.gold b/Golds/encodeE4M3_in1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_in1.gold
@@ -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]
diff --git a/Golds/encodeE4M3_in2.gold b/Golds/encodeE4M3_in2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_in2.gold
@@ -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]
diff --git a/Golds/encodeE4M3_mr1.gold b/Golds/encodeE4M3_mr1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_mr1.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 --   240
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.0
+             Hex: 0xfp4
diff --git a/Golds/encodeE4M3_mr2.gold b/Golds/encodeE4M3_mr2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_mr2.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 --   240.00
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.0
+             Hex: 0xfp4
diff --git a/Golds/encodeE4M3_mr3.gold b/Golds/encodeE4M3_mr3.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_mr3.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 --  -240
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.0
+             Hex: -0xfp4
diff --git a/Golds/encodeE4M3_mr4.gold b/Golds/encodeE4M3_mr4.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_mr4.gold
@@ -0,0 +1,16 @@
+Arguments: -fe4m3 --  -240.00
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.0
+             Hex: -0xfp4
diff --git a/Golds/encodeE4M3_nan.gold b/Golds/encodeE4M3_nan.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_nan.gold
@@ -0,0 +1,13 @@
+Arguments: -fe4m3    nan
+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
diff --git a/Golds/encodeE4M3_special_RNA_+240.01.gold b/Golds/encodeE4M3_special_RNA_+240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_+240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA --  240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.111p+7
+           Octal: 0o3.6p+6
+         Decimal: 240.0
+             Hex: 0xFp+4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_+248.0.gold b/Golds/encodeE4M3_special_RNA_+248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_+248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA --  248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 000
+      Hex layout: 78
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1p+8
+           Octal: 0o4p+6
+         Decimal: 256.0
+             Hex: 0x1p+8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_+419.0.gold b/Golds/encodeE4M3_special_RNA_+419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_+419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA --  419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7d
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.Ap+8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_+432.0.gold b/Golds/encodeE4M3_special_RNA_+432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_+432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA --  432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 110
+      Hex layout: 7e
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+8
+           Octal: 0o7p+6
+         Decimal: 448.0
+             Hex: 0x1.Cp+8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_-240.01.gold b/Golds/encodeE4M3_special_RNA_-240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_-240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA -- -240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.111p+7
+           Octal: -0o3.6p+6
+         Decimal: -240.0
+             Hex: -0xFp+4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_-248.0.gold b/Golds/encodeE4M3_special_RNA_-248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_-248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA -- -248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 000
+      Hex layout: f8
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1p+8
+           Octal: -0o4p+6
+         Decimal: -256.0
+             Hex: -0x1p+8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_-419.0.gold b/Golds/encodeE4M3_special_RNA_-419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_-419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA -- -419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: fd
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.Ap+8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNA_-432.0.gold b/Golds/encodeE4M3_special_RNA_-432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNA_-432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNA -- -432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 110
+      Hex layout: fe
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.11p+8
+           Octal: -0o7p+6
+         Decimal: -448.0
+             Hex: -0x1.Cp+8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_+240.01.gold b/Golds/encodeE4M3_special_RNE_+240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_+240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE --  240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.111p+7
+           Octal: 0o3.6p+6
+         Decimal: 240.0
+             Hex: 0xFp+4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_+248.0.gold b/Golds/encodeE4M3_special_RNE_+248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_+248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE --  248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 000
+      Hex layout: 78
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1p+8
+           Octal: 0o4p+6
+         Decimal: 256.0
+             Hex: 0x1p+8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_+419.0.gold b/Golds/encodeE4M3_special_RNE_+419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_+419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE --  419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7d
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.Ap+8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_+432.0.gold b/Golds/encodeE4M3_special_RNE_+432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_+432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE --  432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 110
+      Hex layout: 7e
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+8
+           Octal: 0o7p+6
+         Decimal: 448.0
+             Hex: 0x1.Cp+8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_-240.01.gold b/Golds/encodeE4M3_special_RNE_-240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_-240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE -- -240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.111p+7
+           Octal: -0o3.6p+6
+         Decimal: -240.0
+             Hex: -0xFp+4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_-248.0.gold b/Golds/encodeE4M3_special_RNE_-248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_-248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE -- -248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 000
+      Hex layout: f8
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1p+8
+           Octal: -0o4p+6
+         Decimal: -256.0
+             Hex: -0x1p+8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_-419.0.gold b/Golds/encodeE4M3_special_RNE_-419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_-419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE -- -419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: fd
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.Ap+8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RNE_-432.0.gold b/Golds/encodeE4M3_special_RNE_-432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RNE_-432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRNE -- -432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 110
+      Hex layout: fe
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.11p+8
+           Octal: -0o7p+6
+         Decimal: -448.0
+             Hex: -0x1.Cp+8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_+240.01.gold b/Golds/encodeE4M3_special_RTN_+240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_+240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN --  240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.111p+7
+           Octal: 0o3.6p+6
+         Decimal: 240.0
+             Hex: 0xFp+4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_+248.0.gold b/Golds/encodeE4M3_special_RTN_+248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_+248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN --  248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.111p+7
+           Octal: 0o3.6p+6
+         Decimal: 240.0
+             Hex: 0xFp+4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_+419.0.gold b/Golds/encodeE4M3_special_RTN_+419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_+419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN --  419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7d
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.Ap+8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_+432.0.gold b/Golds/encodeE4M3_special_RTN_+432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_+432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN --  432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7d
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.Ap+8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_-240.01.gold b/Golds/encodeE4M3_special_RTN_-240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_-240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN -- -240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 000
+      Hex layout: f8
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1p+8
+           Octal: -0o4p+6
+         Decimal: -256.0
+             Hex: -0x1p+8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_-248.0.gold b/Golds/encodeE4M3_special_RTN_-248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_-248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN -- -248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 000
+      Hex layout: f8
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1p+8
+           Octal: -0o4p+6
+         Decimal: -256.0
+             Hex: -0x1p+8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_-419.0.gold b/Golds/encodeE4M3_special_RTN_-419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_-419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN -- -419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 110
+      Hex layout: fe
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.11p+8
+           Octal: -0o7p+6
+         Decimal: -448.0
+             Hex: -0x1.Cp+8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTN_-432.0.gold b/Golds/encodeE4M3_special_RTN_-432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTN_-432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTN -- -432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 110
+      Hex layout: fe
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.11p+8
+           Octal: -0o7p+6
+         Decimal: -448.0
+             Hex: -0x1.Cp+8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_+240.01.gold b/Golds/encodeE4M3_special_RTP_+240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_+240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP --  240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 000
+      Hex layout: 78
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1p+8
+           Octal: 0o4p+6
+         Decimal: 256.0
+             Hex: 0x1p+8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_+248.0.gold b/Golds/encodeE4M3_special_RTP_+248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_+248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP --  248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 256.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 000
+      Hex layout: 78
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1p+8
+           Octal: 0o4p+6
+         Decimal: 256.0
+             Hex: 0x1p+8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_+419.0.gold b/Golds/encodeE4M3_special_RTP_+419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_+419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP --  419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 110
+      Hex layout: 7e
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+8
+           Octal: 0o7p+6
+         Decimal: 448.0
+             Hex: 0x1.Cp+8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_+432.0.gold b/Golds/encodeE4M3_special_RTP_+432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_+432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP --  432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 448.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 110
+      Hex layout: 7e
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+8
+           Octal: 0o7p+6
+         Decimal: 448.0
+             Hex: 0x1.Cp+8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_-240.01.gold b/Golds/encodeE4M3_special_RTP_-240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_-240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP -- -240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.111p+7
+           Octal: -0o3.6p+6
+         Decimal: -240.0
+             Hex: -0xFp+4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_-248.0.gold b/Golds/encodeE4M3_special_RTP_-248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_-248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP -- -248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.111p+7
+           Octal: -0o3.6p+6
+         Decimal: -240.0
+             Hex: -0xFp+4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_-419.0.gold b/Golds/encodeE4M3_special_RTP_-419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_-419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP -- -419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: fd
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.Ap+8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTP_-432.0.gold b/Golds/encodeE4M3_special_RTP_-432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTP_-432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTP -- -432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: fd
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.Ap+8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_+240.01.gold b/Golds/encodeE4M3_special_RTZ_+240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_+240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ --  240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.111p+7
+           Octal: 0o3.6p+6
+         Decimal: 240.0
+             Hex: 0xFp+4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_+248.0.gold b/Golds/encodeE4M3_special_RTZ_+248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_+248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ --  248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 240.0 :: 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.111p+7
+           Octal: 0o3.6p+6
+         Decimal: 240.0
+             Hex: 0xFp+4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_+419.0.gold b/Golds/encodeE4M3_special_RTZ_+419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_+419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ --  419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7d
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.Ap+8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_+432.0.gold b/Golds/encodeE4M3_special_RTZ_+432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_+432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ --  432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 0 1111 101
+      Hex layout: 7d
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Positive
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: 0b1.101p+8
+           Octal: 0o6.4p+6
+         Decimal: 416.0
+             Hex: 0x1.Ap+8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_-240.01.gold b/Golds/encodeE4M3_special_RTZ_-240.01.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_-240.01.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ -- -240.01
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.111p+7
+           Octal: -0o3.6p+6
+         Decimal: -240.0
+             Hex: -0xFp+4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -240.01, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_-248.0.gold b/Golds/encodeE4M3_special_RTZ_-248.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_-248.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ -- -248.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -240.0 :: 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.111p+7
+           Octal: -0o3.6p+6
+         Decimal: -240.0
+             Hex: -0xFp+4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -248.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_-419.0.gold b/Golds/encodeE4M3_special_RTZ_-419.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_-419.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ -- -419.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: fd
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.Ap+8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -419.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_special_RTZ_-432.0.gold b/Golds/encodeE4M3_special_RTZ_-432.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_special_RTZ_-432.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe4m3 -rRTZ -- -432.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -416.0 :: E4M3
+                  7 6543 210
+                  S -E4- S3-
+   Binary layout: 1 1111 101
+      Hex layout: fd
+       Precision: 4 exponent bits, 3 significand bits
+            Sign: Negative
+        Exponent: 8 (Stored: 15, Bias: 7)
+  Classification: FP_NORMAL
+          Binary: -0b1.101p+8
+           Octal: -0o6.4p+6
+         Decimal: -416.0
+             Hex: -0x1.Ap+8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -432.0, represented as E4M3 special value
diff --git a/Golds/encodeE4M3_zero1.gold b/Golds/encodeE4M3_zero1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_zero1.gold
@@ -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
diff --git a/Golds/encodeE4M3_zero2.gold b/Golds/encodeE4M3_zero2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE4M3_zero2.gold
@@ -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
diff --git a/Golds/encodeE8M0_+inf.gold b/Golds/encodeE8M0_+inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_+inf.gold
@@ -0,0 +1,19 @@
+Arguments: -fe8m0    inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.7014118346046923e38 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111110
+      Hex layout: FE
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 127 (Stored: 254, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+127
+           Octal: 0o2p+126
+         Decimal: 1.7014118346046923e38
+             Hex: 0x8p+124
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of Infinity is out of range, saturated to 1.7014118346046923e38.
+                  The representable range is [2^-127, 2^127].
diff --git a/Golds/encodeE8M0_-inf.gold b/Golds/encodeE8M0_-inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_-inf.gold
@@ -0,0 +1,7 @@
+Arguments: -fe8m0 -- -inf
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  E8M0 has no representation for negative values.
+  The representable range is [2^-127, 2^127], plus NaN.
diff --git a/Golds/encodeE8M0_exact.gold b/Golds/encodeE8M0_exact.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_exact.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 --  0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.25 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111101
+      Hex layout: 7D
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -2 (Stored: 125, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-2
+           Octal: 0o2p-3
+         Decimal: 0.25
+             Hex: 0x4p-4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0.25" was exact. No rounding happened.
diff --git a/Golds/encodeE8M0_hex.gold b/Golds/encodeE8M0_hex.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_hex.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 --  0x1.8p1
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 3.0 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_max.gold b/Golds/encodeE8M0_max.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_max.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 --  0x1p+127
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.7014118346046923e38 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111110
+      Hex layout: FE
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 127 (Stored: 254, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+127
+           Octal: 0o2p+126
+         Decimal: 1.7014118346046923e38
+             Hex: 0x8p+124
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0x1p+127" was exact. No rounding happened.
diff --git a/Golds/encodeE8M0_min.gold b/Golds/encodeE8M0_min.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_min.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 --  0x1p-127
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5.877471754111438e-39 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 00000000
+      Hex layout: 00
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -127 (Stored: 0, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-127
+           Octal: 0o4p-129
+         Decimal: 5.877471754111438e-39
+             Hex: 0x2p-128
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0x1p-127" was exact. No rounding happened.
diff --git a/Golds/encodeE8M0_nan.gold b/Golds/encodeE8M0_nan.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_nan.gold
@@ -0,0 +1,15 @@
+Arguments: -fe8m0    nan
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111111
+      Hex layout: FF
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 128 (Stored: 255, Bias: 127)
+  Classification: FP_NAN
+           Value: NaN
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "nan" was exact. No rounding happened.
diff --git a/Golds/encodeE8M0_neg.gold b/Golds/encodeE8M0_neg.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_neg.gold
@@ -0,0 +1,7 @@
+Arguments: -fe8m0 -- -5
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  E8M0 has no representation for negative values.
+  The representable range is [2^-127, 2^127], plus NaN.
diff --git a/Golds/encodeE8M0_one.gold b/Golds/encodeE8M0_one.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_one.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 --  1
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111111
+      Hex layout: 7F
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 127, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "1" was exact. No rounding happened.
diff --git a/Golds/encodeE8M0_oob1.gold b/Golds/encodeE8M0_oob1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_oob1.gold
@@ -0,0 +1,19 @@
+Arguments: -fe8m0 --  1e40
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.7014118346046923e38 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 11111110
+      Hex layout: FE
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 127 (Stored: 254, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+127
+           Octal: 0o2p+126
+         Decimal: 1.7014118346046923e38
+             Hex: 0x8p+124
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.0e40 is out of range, saturated to 1.7014118346046923e38.
+                  The representable range is [2^-127, 2^127].
diff --git a/Golds/encodeE8M0_oob2.gold b/Golds/encodeE8M0_oob2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_oob2.gold
@@ -0,0 +1,19 @@
+Arguments: -fe8m0 --  1e-40
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5.877471754111438e-39 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 00000000
+      Hex layout: 00
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -127 (Stored: 0, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-127
+           Octal: 0o4p-129
+         Decimal: 5.877471754111438e-39
+             Hex: 0x2p-128
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.0e-40 is out of range, saturated to 5.877471754111438e-39.
+                  The representable range is [2^-127, 2^127].
diff --git a/Golds/encodeE8M0_tie_RNA_+0.75.gold b/Golds/encodeE8M0_tie_RNA_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNA_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNA --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111111
+      Hex layout: 7F
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 127, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 0.75 was rounded to 1.0.
diff --git a/Golds/encodeE8M0_tie_RNA_+1.5.gold b/Golds/encodeE8M0_tie_RNA_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNA_+1.5.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNA --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.5 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_tie_RNA_+3.0.gold b/Golds/encodeE8M0_tie_RNA_+3.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNA_+3.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNA --  3.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000001
+      Hex layout: 81
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 2 (Stored: 129, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 3.0 was rounded to 4.0.
diff --git a/Golds/encodeE8M0_tie_RNA_+6.0.gold b/Golds/encodeE8M0_tie_RNA_+6.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNA_+6.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNA --  6.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 8.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000010
+      Hex layout: 82
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 3 (Stored: 130, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+3
+           Octal: 0o1p+3
+         Decimal: 8.0
+             Hex: 0x8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 6.0 was rounded to 8.0.
diff --git a/Golds/encodeE8M0_tie_RNE_+0.75.gold b/Golds/encodeE8M0_tie_RNE_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNE_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNE --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111110
+      Hex layout: 7E
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -1 (Stored: 126, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 0.75 was rounded to 0.5.
diff --git a/Golds/encodeE8M0_tie_RNE_+1.5.gold b/Golds/encodeE8M0_tie_RNE_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNE_+1.5.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNE --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.5 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_tie_RNE_+3.0.gold b/Golds/encodeE8M0_tie_RNE_+3.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNE_+3.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNE --  3.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 3.0 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_tie_RNE_+6.0.gold b/Golds/encodeE8M0_tie_RNE_+6.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RNE_+6.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRNE --  6.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 8.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000010
+      Hex layout: 82
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 3 (Stored: 130, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+3
+           Octal: 0o1p+3
+         Decimal: 8.0
+             Hex: 0x8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 6.0 was rounded to 8.0.
diff --git a/Golds/encodeE8M0_tie_RTN_+0.75.gold b/Golds/encodeE8M0_tie_RTN_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTN_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTN --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111110
+      Hex layout: 7E
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -1 (Stored: 126, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 0.75 was rounded to 0.5.
diff --git a/Golds/encodeE8M0_tie_RTN_+1.5.gold b/Golds/encodeE8M0_tie_RTN_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTN_+1.5.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTN --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111111
+      Hex layout: 7F
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 127, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.5 was rounded to 1.0.
diff --git a/Golds/encodeE8M0_tie_RTN_+3.0.gold b/Golds/encodeE8M0_tie_RTN_+3.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTN_+3.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTN --  3.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 3.0 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_tie_RTN_+6.0.gold b/Golds/encodeE8M0_tie_RTN_+6.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTN_+6.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTN --  6.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000001
+      Hex layout: 81
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 2 (Stored: 129, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 6.0 was rounded to 4.0.
diff --git a/Golds/encodeE8M0_tie_RTP_+0.75.gold b/Golds/encodeE8M0_tie_RTP_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTP_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTP --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111111
+      Hex layout: 7F
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 127, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 0.75 was rounded to 1.0.
diff --git a/Golds/encodeE8M0_tie_RTP_+1.5.gold b/Golds/encodeE8M0_tie_RTP_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTP_+1.5.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTP --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.5 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_tie_RTP_+3.0.gold b/Golds/encodeE8M0_tie_RTP_+3.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTP_+3.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTP --  3.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000001
+      Hex layout: 81
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 2 (Stored: 129, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 3.0 was rounded to 4.0.
diff --git a/Golds/encodeE8M0_tie_RTP_+6.0.gold b/Golds/encodeE8M0_tie_RTP_+6.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTP_+6.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTP --  6.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 8.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000010
+      Hex layout: 82
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 3 (Stored: 130, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+3
+           Octal: 0o1p+3
+         Decimal: 8.0
+             Hex: 0x8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 6.0 was rounded to 8.0.
diff --git a/Golds/encodeE8M0_tie_RTZ_+0.75.gold b/Golds/encodeE8M0_tie_RTZ_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTZ_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTZ --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111110
+      Hex layout: 7E
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -1 (Stored: 126, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 0.75 was rounded to 0.5.
diff --git a/Golds/encodeE8M0_tie_RTZ_+1.5.gold b/Golds/encodeE8M0_tie_RTZ_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTZ_+1.5.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTZ --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 01111111
+      Hex layout: 7F
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 127, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.5 was rounded to 1.0.
diff --git a/Golds/encodeE8M0_tie_RTZ_+3.0.gold b/Golds/encodeE8M0_tie_RTZ_+3.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTZ_+3.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTZ --  3.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000000
+      Hex layout: 80
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 128, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 3.0 was rounded to 2.0.
diff --git a/Golds/encodeE8M0_tie_RTZ_+6.0.gold b/Golds/encodeE8M0_tie_RTZ_+6.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_tie_RTZ_+6.0.gold
@@ -0,0 +1,18 @@
+Arguments: -fe8m0 -rRTZ --  6.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 10000001
+      Hex layout: 81
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: 2 (Stored: 129, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 6.0 was rounded to 4.0.
diff --git a/Golds/encodeE8M0_zero1.gold b/Golds/encodeE8M0_zero1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_zero1.gold
@@ -0,0 +1,19 @@
+Arguments: -fe8m0 --  0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5.877471754111438e-39 :: E8M0
+                  76543210
+                  ---E8---
+   Binary layout: 00000000
+      Hex layout: 00
+       Precision: 8 exponent bits, no significand
+            Sign: Positive (always)
+        Exponent: -127 (Stored: 0, Bias: 127)
+  Classification: FP_NORMAL
+          Binary: 0b1p-127
+           Octal: 0o4p-129
+         Decimal: 5.877471754111438e-39
+             Hex: 0x2p-128
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 0.0 is out of range, saturated to 5.877471754111438e-39.
+                  The representable range is [2^-127, 2^127].
diff --git a/Golds/encodeE8M0_zero2.gold b/Golds/encodeE8M0_zero2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeE8M0_zero2.gold
@@ -0,0 +1,7 @@
+Arguments: -fe8m0 --  -0
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  E8M0 has no representation for negative values.
+  The representable range is [2^-127, 2^127], plus NaN.
diff --git a/Golds/encodeFP4E0M3_+inf.gold b/Golds/encodeFP4E0M3_+inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_+inf.gold
@@ -0,0 +1,7 @@
+Arguments: -ffp4e0m3    inf
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  FP4E0M3 has no representation for infinity.
+  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_-inf.gold b/Golds/encodeFP4E0M3_-inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_-inf.gold
@@ -0,0 +1,7 @@
+Arguments: -ffp4e0m3 -- -inf
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  FP4E0M3 has no representation for infinity.
+  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_exact.gold b/Golds/encodeFP4E0M3_exact.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_exact.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 --  5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 101
+      Hex layout: 5
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b101
+           Octal: 0o5
+         Decimal: 5
+             Hex: 0x5
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "5" was exact. No rounding happened.
diff --git a/Golds/encodeFP4E0M3_hex.gold b/Golds/encodeFP4E0M3_hex.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_hex.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 --  0x1.8p1
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 011
+      Hex layout: 3
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b11
+           Octal: 0o3
+         Decimal: 3
+             Hex: 0x3
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0x1.8p1" was exact. No rounding happened.
diff --git a/Golds/encodeFP4E0M3_max.gold b/Golds/encodeFP4E0M3_max.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_max.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 --  7
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "7" was exact. No rounding happened.
diff --git a/Golds/encodeFP4E0M3_min.gold b/Golds/encodeFP4E0M3_min.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_min.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -- -7
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-7" was exact. No rounding happened.
diff --git a/Golds/encodeFP4E0M3_nan.gold b/Golds/encodeFP4E0M3_nan.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_nan.gold
@@ -0,0 +1,6 @@
+Arguments: -ffp4e0m3    nan
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  FP4E0M3 has no representation for NaN.
diff --git a/Golds/encodeFP4E0M3_oob1.gold b/Golds/encodeFP4E0M3_oob1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_oob1.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 --  100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 100.0 is out of range, saturated to 7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_oob2.gold b/Golds/encodeFP4E0M3_oob2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_oob2.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -- -100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -100.0 is out of range, saturated to -7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_rnd1.gold b/Golds/encodeFP4E0M3_rnd1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_rnd1.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 --  0.4
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 000
+      Hex layout: 0
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b0
+           Octal: 0o0
+         Decimal: 0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 0.4 was rounded to 0.
diff --git a/Golds/encodeFP4E0M3_rnd2.gold b/Golds/encodeFP4E0M3_rnd2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_rnd2.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -- -0.4
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 000
+      Hex layout: 8
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b0
+           Octal: -0o0
+         Decimal: -0
+             Hex: -0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -0.4 was rounded to -0.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+0.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 001
+      Hex layout: 1
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1
+             Hex: 0x1
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 0.5 was rounded to 1.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+1.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.5 was rounded to 2.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+2.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 011
+      Hex layout: 3
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b11
+           Octal: 0o3
+         Decimal: 3
+             Hex: 0x3
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 2.5 was rounded to 3.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+3.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 3.5 was rounded to 4.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+4.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 101
+      Hex layout: 5
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b101
+           Octal: 0o5
+         Decimal: 5
+             Hex: 0x5
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 4.5 was rounded to 5.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+5.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 5.5 was rounded to 6.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+6.5.gold b/Golds/encodeFP4E0M3_tie_RNA_+6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA --  6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 6.5 was rounded to 7.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_+8.0.gold b/Golds/encodeFP4E0M3_tie_RNA_+8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_+8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRNA --  8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 8.0 is out of range, saturated to 7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-0.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 001
+      Hex layout: 9
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1
+             Hex: -0x1
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -0.5 was rounded to -1.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-1.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -1.5 was rounded to -2.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-2.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 011
+      Hex layout: B
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b11
+           Octal: -0o3
+         Decimal: -3
+             Hex: -0x3
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -2.5 was rounded to -3.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-3.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -3.5 was rounded to -4.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-4.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 101
+      Hex layout: D
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b101
+           Octal: -0o5
+         Decimal: -5
+             Hex: -0x5
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -4.5 was rounded to -5.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-5.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -5.5 was rounded to -6.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-6.5.gold b/Golds/encodeFP4E0M3_tie_RNA_-6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNA -- -6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -6.5 was rounded to -7.
diff --git a/Golds/encodeFP4E0M3_tie_RNA_-8.0.gold b/Golds/encodeFP4E0M3_tie_RNA_-8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNA_-8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRNA -- -8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -8.0 is out of range, saturated to -7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+0.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 000
+      Hex layout: 0
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b0
+           Octal: 0o0
+         Decimal: 0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 0.5 was rounded to 0.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+1.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.5 was rounded to 2.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+2.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 2.5 was rounded to 2.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+3.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 3.5 was rounded to 4.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+4.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 4.5 was rounded to 4.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+5.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 5.5 was rounded to 6.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+6.5.gold b/Golds/encodeFP4E0M3_tie_RNE_+6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE --  6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 6.5 was rounded to 6.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_+8.0.gold b/Golds/encodeFP4E0M3_tie_RNE_+8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_+8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRNE --  8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 8.0 is out of range, saturated to 7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-0.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 000
+      Hex layout: 8
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b0
+           Octal: -0o0
+         Decimal: -0
+             Hex: -0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -0.5 was rounded to -0.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-1.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -1.5 was rounded to -2.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-2.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -2.5 was rounded to -2.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-3.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -3.5 was rounded to -4.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-4.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -4.5 was rounded to -4.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-5.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -5.5 was rounded to -6.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-6.5.gold b/Golds/encodeFP4E0M3_tie_RNE_-6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRNE -- -6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -6.5 was rounded to -6.
diff --git a/Golds/encodeFP4E0M3_tie_RNE_-8.0.gold b/Golds/encodeFP4E0M3_tie_RNE_-8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RNE_-8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRNE -- -8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -8.0 is out of range, saturated to -7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+0.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 000
+      Hex layout: 0
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b0
+           Octal: 0o0
+         Decimal: 0
+             Hex: 0x0
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 0.5 was rounded to 0.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+1.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 001
+      Hex layout: 1
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1
+             Hex: 0x1
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.5 was rounded to 1.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+2.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 2.5 was rounded to 2.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+3.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 011
+      Hex layout: 3
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b11
+           Octal: 0o3
+         Decimal: 3
+             Hex: 0x3
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 3.5 was rounded to 3.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+4.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 4.5 was rounded to 4.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+5.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 101
+      Hex layout: 5
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b101
+           Octal: 0o5
+         Decimal: 5
+             Hex: 0x5
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 5.5 was rounded to 5.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+6.5.gold b/Golds/encodeFP4E0M3_tie_RTN_+6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN --  6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 6.5 was rounded to 6.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_+8.0.gold b/Golds/encodeFP4E0M3_tie_RTN_+8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_+8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRTN --  8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 8.0 is out of range, saturated to 7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-0.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 001
+      Hex layout: 9
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1
+             Hex: -0x1
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -0.5 was rounded to -1.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-1.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -1.5 was rounded to -2.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-2.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 011
+      Hex layout: B
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b11
+           Octal: -0o3
+         Decimal: -3
+             Hex: -0x3
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -2.5 was rounded to -3.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-3.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -3.5 was rounded to -4.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-4.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 101
+      Hex layout: D
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b101
+           Octal: -0o5
+         Decimal: -5
+             Hex: -0x5
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -4.5 was rounded to -5.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-5.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -5.5 was rounded to -6.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-6.5.gold b/Golds/encodeFP4E0M3_tie_RTN_-6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTN -- -6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -6.5 was rounded to -7.
diff --git a/Golds/encodeFP4E0M3_tie_RTN_-8.0.gold b/Golds/encodeFP4E0M3_tie_RTN_-8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTN_-8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRTN -- -8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -8.0 is out of range, saturated to -7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+0.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 001
+      Hex layout: 1
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1
+             Hex: 0x1
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 0.5 was rounded to 1.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+1.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.5 was rounded to 2.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+2.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 011
+      Hex layout: 3
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b11
+           Octal: 0o3
+         Decimal: 3
+             Hex: 0x3
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 2.5 was rounded to 3.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+3.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 3.5 was rounded to 4.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+4.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 101
+      Hex layout: 5
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b101
+           Octal: 0o5
+         Decimal: 5
+             Hex: 0x5
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 4.5 was rounded to 5.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+5.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 5.5 was rounded to 6.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+6.5.gold b/Golds/encodeFP4E0M3_tie_RTP_+6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP --  6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 6.5 was rounded to 7.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_+8.0.gold b/Golds/encodeFP4E0M3_tie_RTP_+8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_+8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRTP --  8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 8.0 is out of range, saturated to 7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-0.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 000
+      Hex layout: 8
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b0
+           Octal: -0o0
+         Decimal: -0
+             Hex: -0x0
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -0.5 was rounded to -0.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-1.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 001
+      Hex layout: 9
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1
+             Hex: -0x1
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -1.5 was rounded to -1.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-2.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -2.5 was rounded to -2.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-3.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 011
+      Hex layout: B
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b11
+           Octal: -0o3
+         Decimal: -3
+             Hex: -0x3
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -3.5 was rounded to -3.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-4.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -4.5 was rounded to -4.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-5.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 101
+      Hex layout: D
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b101
+           Octal: -0o5
+         Decimal: -5
+             Hex: -0x5
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -5.5 was rounded to -5.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-6.5.gold b/Golds/encodeFP4E0M3_tie_RTP_-6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTP -- -6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -6.5 was rounded to -6.
diff --git a/Golds/encodeFP4E0M3_tie_RTP_-8.0.gold b/Golds/encodeFP4E0M3_tie_RTP_-8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTP_-8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRTP -- -8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -8.0 is out of range, saturated to -7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+0.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 000
+      Hex layout: 0
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b0
+           Octal: 0o0
+         Decimal: 0
+             Hex: 0x0
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 0.5 was rounded to 0.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+1.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 001
+      Hex layout: 1
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1
+             Hex: 0x1
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.5 was rounded to 1.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+2.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 010
+      Hex layout: 2
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b10
+           Octal: 0o2
+         Decimal: 2
+             Hex: 0x2
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 2.5 was rounded to 2.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+3.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 011
+      Hex layout: 3
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b11
+           Octal: 0o3
+         Decimal: 3
+             Hex: 0x3
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 3.5 was rounded to 3.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+4.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 100
+      Hex layout: 4
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b100
+           Octal: 0o4
+         Decimal: 4
+             Hex: 0x4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 4.5 was rounded to 4.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+5.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 101
+      Hex layout: 5
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b101
+           Octal: 0o5
+         Decimal: 5
+             Hex: 0x5
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 5.5 was rounded to 5.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+6.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_+6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ --  6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 110
+      Hex layout: 6
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b110
+           Octal: 0o6
+         Decimal: 6
+             Hex: 0x6
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 6.5 was rounded to 6.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_+8.0.gold b/Golds/encodeFP4E0M3_tie_RTZ_+8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_+8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRTZ --  8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 111
+      Hex layout: 7
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b111
+           Octal: 0o7
+         Decimal: 7
+             Hex: 0x7
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 8.0 is out of range, saturated to 7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-0.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-0.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-0.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 000
+      Hex layout: 8
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b0
+           Octal: -0o0
+         Decimal: -0
+             Hex: -0x0
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -0.5 was rounded to -0.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-1.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-1.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-1.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 001
+      Hex layout: 9
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1
+             Hex: -0x1
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -1.5 was rounded to -1.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-2.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-2.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 010
+      Hex layout: A
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b10
+           Octal: -0o2
+         Decimal: -2
+             Hex: -0x2
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -2.5 was rounded to -2.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-3.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-3.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 011
+      Hex layout: B
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b11
+           Octal: -0o3
+         Decimal: -3
+             Hex: -0x3
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -3.5 was rounded to -3.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-4.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-4.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-4.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -4.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 100
+      Hex layout: C
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b100
+           Octal: -0o4
+         Decimal: -4
+             Hex: -0x4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -4.5 was rounded to -4.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-5.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-5.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-5.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -5.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -5 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 101
+      Hex layout: D
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b101
+           Octal: -0o5
+         Decimal: -5
+             Hex: -0x5
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -5.5 was rounded to -5.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-6.5.gold b/Golds/encodeFP4E0M3_tie_RTZ_-6.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-6.5.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 -rRTZ -- -6.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 110
+      Hex layout: E
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b110
+           Octal: -0o6
+         Decimal: -6
+             Hex: -0x6
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -6.5 was rounded to -6.
diff --git a/Golds/encodeFP4E0M3_tie_RTZ_-8.0.gold b/Golds/encodeFP4E0M3_tie_RTZ_-8.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_tie_RTZ_-8.0.gold
@@ -0,0 +1,17 @@
+Arguments: -ffp4e0m3 -rRTZ -- -8.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -7 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 111
+      Hex layout: F
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b111
+           Octal: -0o7
+         Decimal: -7
+             Hex: -0x7
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -8.0 is out of range, saturated to -7.
+                  The representable range is [-7, 7].
diff --git a/Golds/encodeFP4E0M3_zero1.gold b/Golds/encodeFP4E0M3_zero1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_zero1.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 --  0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 0 000
+      Hex layout: 0
+            Type: 4-bit sign-magnitude integer
+            Sign: Positive
+          Binary: 0b0
+           Octal: 0o0
+         Decimal: 0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0" was exact. No rounding happened.
diff --git a/Golds/encodeFP4E0M3_zero2.gold b/Golds/encodeFP4E0M3_zero2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4E0M3_zero2.gold
@@ -0,0 +1,16 @@
+Arguments: -ffp4e0m3 --  -0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0 :: FP4E0M3
+                  3 210
+                  S -M-
+   Binary layout: 1 000
+      Hex layout: 8
+            Type: 4-bit sign-magnitude integer
+            Sign: Negative
+          Binary: -0b0
+           Octal: -0o0
+         Decimal: -0
+             Hex: -0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-0" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_+inf.gold b/Golds/encodeFP4_+inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_+inf.gold
@@ -0,0 +1,7 @@
+Arguments: -ffp4    inf
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  FP4 has no representation for infinity.
+  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_-inf.gold b/Golds/encodeFP4_-inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_-inf.gold
@@ -0,0 +1,7 @@
+Arguments: -ffp4 -- -inf
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  FP4 has no representation for infinity.
+  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_dev1.gold b/Golds/encodeFP4_dev1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_dev1.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  4
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "4" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_dev2.gold b/Golds/encodeFP4_dev2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_dev2.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  6
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "6" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_dev3.gold b/Golds/encodeFP4_dev3.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_dev3.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -- -6
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-6" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_hex.gold b/Golds/encodeFP4_hex.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_hex.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  0x1.8p2
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0x1.8p2" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_nan.gold b/Golds/encodeFP4_nan.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_nan.gold
@@ -0,0 +1,6 @@
+Arguments: -ffp4    nan
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  FP4 has no representation for NaN.
diff --git a/Golds/encodeFP4_norm.gold b/Golds/encodeFP4_norm.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_norm.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  1.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 1
+      Hex layout: 3
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1
+           Octal: 0o1.4
+         Decimal: 1.5
+             Hex: 0x1.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "1.5" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_oob1.gold b/Golds/encodeFP4_oob1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_oob1.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 --  100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 100.0 is out of range, saturated to 6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_oob2.gold b/Golds/encodeFP4_oob2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_oob2.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -- -100
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -100.0 is out of range, saturated to -6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_sub.gold b/Golds/encodeFP4_sub.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_sub.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  0.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 1
+      Hex layout: 1
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0.5" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_tie_RNA_+0.25.gold b/Golds/encodeFP4_tie_RNA_+0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 1
+      Hex layout: 1
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 0.25 was rounded to 0.5.
diff --git a/Golds/encodeFP4_tie_RNA_+0.75.gold b/Golds/encodeFP4_tie_RNA_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 0.75 was rounded to 1.0.
diff --git a/Golds/encodeFP4_tie_RNA_+1.25.gold b/Golds/encodeFP4_tie_RNA_+1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 1
+      Hex layout: 3
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1
+           Octal: 0o1.4
+         Decimal: 1.5
+             Hex: 0x1.8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.25 was rounded to 1.5.
diff --git a/Golds/encodeFP4_tie_RNA_+1.75.gold b/Golds/encodeFP4_tie_RNA_+1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.75 was rounded to 2.0.
diff --git a/Golds/encodeFP4_tie_RNA_+2.5.gold b/Golds/encodeFP4_tie_RNA_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 1
+      Hex layout: 5
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p1
+           Octal: 0o3
+         Decimal: 3.0
+             Hex: 0x3
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 2.5 was rounded to 3.0.
diff --git a/Golds/encodeFP4_tie_RNA_+3.5.gold b/Golds/encodeFP4_tie_RNA_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 3.5 was rounded to 4.0.
diff --git a/Golds/encodeFP4_tie_RNA_+5.0.gold b/Golds/encodeFP4_tie_RNA_+5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA --  5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 5.0 was rounded to 6.0.
diff --git a/Golds/encodeFP4_tie_RNA_+7.0.gold b/Golds/encodeFP4_tie_RNA_+7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_+7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRNA --  7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 7.0 is out of range, saturated to 6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RNA_-0.25.gold b/Golds/encodeFP4_tie_RNA_-0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 1
+      Hex layout: 9
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: -0b1p-1
+           Octal: -0o4p-3
+         Decimal: -0.5
+             Hex: -0x8p-4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -0.25 was rounded to -0.5.
diff --git a/Golds/encodeFP4_tie_RNA_-0.75.gold b/Golds/encodeFP4_tie_RNA_-0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -0.75 was rounded to -1.0.
diff --git a/Golds/encodeFP4_tie_RNA_-1.25.gold b/Golds/encodeFP4_tie_RNA_-1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 1
+      Hex layout: B
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1
+           Octal: -0o1.4
+         Decimal: -1.5
+             Hex: -0x1.8
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -1.25 was rounded to -1.5.
diff --git a/Golds/encodeFP4_tie_RNA_-1.75.gold b/Golds/encodeFP4_tie_RNA_-1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -1.75 was rounded to -2.0.
diff --git a/Golds/encodeFP4_tie_RNA_-2.5.gold b/Golds/encodeFP4_tie_RNA_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 1
+      Hex layout: D
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p1
+           Octal: -0o3
+         Decimal: -3.0
+             Hex: -0x3
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -2.5 was rounded to -3.0.
diff --git a/Golds/encodeFP4_tie_RNA_-3.5.gold b/Golds/encodeFP4_tie_RNA_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -3.5 was rounded to -4.0.
diff --git a/Golds/encodeFP4_tie_RNA_-5.0.gold b/Golds/encodeFP4_tie_RNA_-5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNA -- -5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -5.0 was rounded to -6.0.
diff --git a/Golds/encodeFP4_tie_RNA_-7.0.gold b/Golds/encodeFP4_tie_RNA_-7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNA_-7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRNA -- -7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of -7.0 is out of range, saturated to -6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RNE_+0.25.gold b/Golds/encodeFP4_tie_RNE_+0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 0
+      Hex layout: 0
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 0.25 was rounded to 0.0.
diff --git a/Golds/encodeFP4_tie_RNE_+0.75.gold b/Golds/encodeFP4_tie_RNE_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 0.75 was rounded to 1.0.
diff --git a/Golds/encodeFP4_tie_RNE_+1.25.gold b/Golds/encodeFP4_tie_RNE_+1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.25 was rounded to 1.0.
diff --git a/Golds/encodeFP4_tie_RNE_+1.75.gold b/Golds/encodeFP4_tie_RNE_+1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.75 was rounded to 2.0.
diff --git a/Golds/encodeFP4_tie_RNE_+2.5.gold b/Golds/encodeFP4_tie_RNE_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 2.5 was rounded to 2.0.
diff --git a/Golds/encodeFP4_tie_RNE_+3.5.gold b/Golds/encodeFP4_tie_RNE_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 3.5 was rounded to 4.0.
diff --git a/Golds/encodeFP4_tie_RNE_+5.0.gold b/Golds/encodeFP4_tie_RNE_+5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE --  5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 5.0 was rounded to 4.0.
diff --git a/Golds/encodeFP4_tie_RNE_+7.0.gold b/Golds/encodeFP4_tie_RNE_+7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_+7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRNE --  7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 7.0 is out of range, saturated to 6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RNE_-0.25.gold b/Golds/encodeFP4_tie_RNE_-0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 0
+      Hex layout: 8
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: -0b0.0
+           Octal: -0o0.0
+         Decimal: -0.0
+             Hex: -0o0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -0.25 was rounded to -0.0.
diff --git a/Golds/encodeFP4_tie_RNE_-0.75.gold b/Golds/encodeFP4_tie_RNE_-0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -0.75 was rounded to -1.0.
diff --git a/Golds/encodeFP4_tie_RNE_-1.25.gold b/Golds/encodeFP4_tie_RNE_-1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -1.25 was rounded to -1.0.
diff --git a/Golds/encodeFP4_tie_RNE_-1.75.gold b/Golds/encodeFP4_tie_RNE_-1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -1.75 was rounded to -2.0.
diff --git a/Golds/encodeFP4_tie_RNE_-2.5.gold b/Golds/encodeFP4_tie_RNE_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -2.5 was rounded to -2.0.
diff --git a/Golds/encodeFP4_tie_RNE_-3.5.gold b/Golds/encodeFP4_tie_RNE_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -3.5 was rounded to -4.0.
diff --git a/Golds/encodeFP4_tie_RNE_-5.0.gold b/Golds/encodeFP4_tie_RNE_-5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRNE -- -5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -5.0 was rounded to -4.0.
diff --git a/Golds/encodeFP4_tie_RNE_-7.0.gold b/Golds/encodeFP4_tie_RNE_-7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RNE_-7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRNE -- -7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of -7.0 is out of range, saturated to -6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RTN_+0.25.gold b/Golds/encodeFP4_tie_RTN_+0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 0
+      Hex layout: 0
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 0.25 was rounded to 0.0.
diff --git a/Golds/encodeFP4_tie_RTN_+0.75.gold b/Golds/encodeFP4_tie_RTN_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 1
+      Hex layout: 1
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 0.75 was rounded to 0.5.
diff --git a/Golds/encodeFP4_tie_RTN_+1.25.gold b/Golds/encodeFP4_tie_RTN_+1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.25 was rounded to 1.0.
diff --git a/Golds/encodeFP4_tie_RTN_+1.75.gold b/Golds/encodeFP4_tie_RTN_+1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 1
+      Hex layout: 3
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1
+           Octal: 0o1.4
+         Decimal: 1.5
+             Hex: 0x1.8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.75 was rounded to 1.5.
diff --git a/Golds/encodeFP4_tie_RTN_+2.5.gold b/Golds/encodeFP4_tie_RTN_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 2.5 was rounded to 2.0.
diff --git a/Golds/encodeFP4_tie_RTN_+3.5.gold b/Golds/encodeFP4_tie_RTN_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 1
+      Hex layout: 5
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p1
+           Octal: 0o3
+         Decimal: 3.0
+             Hex: 0x3
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 3.5 was rounded to 3.0.
diff --git a/Golds/encodeFP4_tie_RTN_+5.0.gold b/Golds/encodeFP4_tie_RTN_+5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN --  5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 5.0 was rounded to 4.0.
diff --git a/Golds/encodeFP4_tie_RTN_+7.0.gold b/Golds/encodeFP4_tie_RTN_+7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_+7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRTN --  7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 7.0 is out of range, saturated to 6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RTN_-0.25.gold b/Golds/encodeFP4_tie_RTN_-0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 1
+      Hex layout: 9
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: -0b1p-1
+           Octal: -0o4p-3
+         Decimal: -0.5
+             Hex: -0x8p-4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -0.25 was rounded to -0.5.
diff --git a/Golds/encodeFP4_tie_RTN_-0.75.gold b/Golds/encodeFP4_tie_RTN_-0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -0.75 was rounded to -1.0.
diff --git a/Golds/encodeFP4_tie_RTN_-1.25.gold b/Golds/encodeFP4_tie_RTN_-1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 1
+      Hex layout: B
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1
+           Octal: -0o1.4
+         Decimal: -1.5
+             Hex: -0x1.8
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -1.25 was rounded to -1.5.
diff --git a/Golds/encodeFP4_tie_RTN_-1.75.gold b/Golds/encodeFP4_tie_RTN_-1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -1.75 was rounded to -2.0.
diff --git a/Golds/encodeFP4_tie_RTN_-2.5.gold b/Golds/encodeFP4_tie_RTN_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 1
+      Hex layout: D
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p1
+           Octal: -0o3
+         Decimal: -3.0
+             Hex: -0x3
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -2.5 was rounded to -3.0.
diff --git a/Golds/encodeFP4_tie_RTN_-3.5.gold b/Golds/encodeFP4_tie_RTN_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -3.5 was rounded to -4.0.
diff --git a/Golds/encodeFP4_tie_RTN_-5.0.gold b/Golds/encodeFP4_tie_RTN_-5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTN -- -5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -5.0 was rounded to -6.0.
diff --git a/Golds/encodeFP4_tie_RTN_-7.0.gold b/Golds/encodeFP4_tie_RTN_-7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTN_-7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRTN -- -7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of -7.0 is out of range, saturated to -6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RTP_+0.25.gold b/Golds/encodeFP4_tie_RTP_+0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 1
+      Hex layout: 1
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 0.25 was rounded to 0.5.
diff --git a/Golds/encodeFP4_tie_RTP_+0.75.gold b/Golds/encodeFP4_tie_RTP_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 0.75 was rounded to 1.0.
diff --git a/Golds/encodeFP4_tie_RTP_+1.25.gold b/Golds/encodeFP4_tie_RTP_+1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 1
+      Hex layout: 3
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1
+           Octal: 0o1.4
+         Decimal: 1.5
+             Hex: 0x1.8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.25 was rounded to 1.5.
diff --git a/Golds/encodeFP4_tie_RTP_+1.75.gold b/Golds/encodeFP4_tie_RTP_+1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.75 was rounded to 2.0.
diff --git a/Golds/encodeFP4_tie_RTP_+2.5.gold b/Golds/encodeFP4_tie_RTP_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 1
+      Hex layout: 5
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p1
+           Octal: 0o3
+         Decimal: 3.0
+             Hex: 0x3
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 2.5 was rounded to 3.0.
diff --git a/Golds/encodeFP4_tie_RTP_+3.5.gold b/Golds/encodeFP4_tie_RTP_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 3.5 was rounded to 4.0.
diff --git a/Golds/encodeFP4_tie_RTP_+5.0.gold b/Golds/encodeFP4_tie_RTP_+5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP --  5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 5.0 was rounded to 6.0.
diff --git a/Golds/encodeFP4_tie_RTP_+7.0.gold b/Golds/encodeFP4_tie_RTP_+7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_+7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRTP --  7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 7.0 is out of range, saturated to 6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RTP_-0.25.gold b/Golds/encodeFP4_tie_RTP_-0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 0
+      Hex layout: 8
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: -0b0.0
+           Octal: -0o0.0
+         Decimal: -0.0
+             Hex: -0o0
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -0.25 was rounded to -0.0.
diff --git a/Golds/encodeFP4_tie_RTP_-0.75.gold b/Golds/encodeFP4_tie_RTP_-0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 1
+      Hex layout: 9
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: -0b1p-1
+           Octal: -0o4p-3
+         Decimal: -0.5
+             Hex: -0x8p-4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -0.75 was rounded to -0.5.
diff --git a/Golds/encodeFP4_tie_RTP_-1.25.gold b/Golds/encodeFP4_tie_RTP_-1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -1.25 was rounded to -1.0.
diff --git a/Golds/encodeFP4_tie_RTP_-1.75.gold b/Golds/encodeFP4_tie_RTP_-1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 1
+      Hex layout: B
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1
+           Octal: -0o1.4
+         Decimal: -1.5
+             Hex: -0x1.8
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -1.75 was rounded to -1.5.
diff --git a/Golds/encodeFP4_tie_RTP_-2.5.gold b/Golds/encodeFP4_tie_RTP_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -2.5 was rounded to -2.0.
diff --git a/Golds/encodeFP4_tie_RTP_-3.5.gold b/Golds/encodeFP4_tie_RTP_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 1
+      Hex layout: D
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p1
+           Octal: -0o3
+         Decimal: -3.0
+             Hex: -0x3
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -3.5 was rounded to -3.0.
diff --git a/Golds/encodeFP4_tie_RTP_-5.0.gold b/Golds/encodeFP4_tie_RTP_-5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTP -- -5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -5.0 was rounded to -4.0.
diff --git a/Golds/encodeFP4_tie_RTP_-7.0.gold b/Golds/encodeFP4_tie_RTP_-7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTP_-7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRTP -- -7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of -7.0 is out of range, saturated to -6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RTZ_+0.25.gold b/Golds/encodeFP4_tie_RTZ_+0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 0
+      Hex layout: 0
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 0.25 was rounded to 0.0.
diff --git a/Golds/encodeFP4_tie_RTZ_+0.75.gold b/Golds/encodeFP4_tie_RTZ_+0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 1
+      Hex layout: 1
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-1
+           Octal: 0o4p-3
+         Decimal: 0.5
+             Hex: 0x8p-4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 0.75 was rounded to 0.5.
diff --git a/Golds/encodeFP4_tie_RTZ_+1.25.gold b/Golds/encodeFP4_tie_RTZ_+1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 0
+      Hex layout: 2
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.25 was rounded to 1.0.
diff --git a/Golds/encodeFP4_tie_RTZ_+1.75.gold b/Golds/encodeFP4_tie_RTZ_+1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 01 1
+      Hex layout: 3
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1
+           Octal: 0o1.4
+         Decimal: 1.5
+             Hex: 0x1.8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.75 was rounded to 1.5.
diff --git a/Golds/encodeFP4_tie_RTZ_+2.5.gold b/Golds/encodeFP4_tie_RTZ_+2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 0
+      Hex layout: 4
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 2.5 was rounded to 2.0.
diff --git a/Golds/encodeFP4_tie_RTZ_+3.5.gold b/Golds/encodeFP4_tie_RTZ_+3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 10 1
+      Hex layout: 5
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p1
+           Octal: 0o3
+         Decimal: 3.0
+             Hex: 0x3
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 3.5 was rounded to 3.0.
diff --git a/Golds/encodeFP4_tie_RTZ_+5.0.gold b/Golds/encodeFP4_tie_RTZ_+5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ --  5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 0
+      Hex layout: 6
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1p+2
+           Octal: 0o4
+         Decimal: 4.0
+             Hex: 0x4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 5.0 was rounded to 4.0.
diff --git a/Golds/encodeFP4_tie_RTZ_+7.0.gold b/Golds/encodeFP4_tie_RTZ_+7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_+7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRTZ --  7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 11 1
+      Hex layout: 7
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p+2
+           Octal: 0o6
+         Decimal: 6.0
+             Hex: 0x6
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 7.0 is out of range, saturated to 6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_tie_RTZ_-0.25.gold b/Golds/encodeFP4_tie_RTZ_-0.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-0.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -0.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 0
+      Hex layout: 8
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: -0b0.0
+           Octal: -0o0.0
+         Decimal: -0.0
+             Hex: -0o0
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -0.25 was rounded to -0.0.
diff --git a/Golds/encodeFP4_tie_RTZ_-0.75.gold b/Golds/encodeFP4_tie_RTZ_-0.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-0.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -0.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 1
+      Hex layout: 9
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Subnormal, with fixed exponent value. Stored: 0, Bias: 1)
+  Classification: FP_SUBNORMAL
+          Binary: -0b1p-1
+           Octal: -0o4p-3
+         Decimal: -0.5
+             Hex: -0x8p-4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -0.75 was rounded to -0.5.
diff --git a/Golds/encodeFP4_tie_RTZ_-1.25.gold b/Golds/encodeFP4_tie_RTZ_-1.25.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-1.25.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -1.25
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 0
+      Hex layout: A
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1
+           Octal: -0o1
+         Decimal: -1.0
+             Hex: -0x1
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -1.25 was rounded to -1.0.
diff --git a/Golds/encodeFP4_tie_RTZ_-1.75.gold b/Golds/encodeFP4_tie_RTZ_-1.75.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-1.75.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -1.75
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -1.5 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 01 1
+      Hex layout: B
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 0 (Stored: 1, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1
+           Octal: -0o1.4
+         Decimal: -1.5
+             Hex: -0x1.8
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -1.75 was rounded to -1.5.
diff --git a/Golds/encodeFP4_tie_RTZ_-2.5.gold b/Golds/encodeFP4_tie_RTZ_-2.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-2.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -2.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 0
+      Hex layout: C
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p1
+           Octal: -0o2
+         Decimal: -2.0
+             Hex: -0x2
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -2.5 was rounded to -2.0.
diff --git a/Golds/encodeFP4_tie_RTZ_-3.5.gold b/Golds/encodeFP4_tie_RTZ_-3.5.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-3.5.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -3.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -3.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 10 1
+      Hex layout: D
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 1 (Stored: 2, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p1
+           Octal: -0o3
+         Decimal: -3.0
+             Hex: -0x3
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -3.5 was rounded to -3.0.
diff --git a/Golds/encodeFP4_tie_RTZ_-5.0.gold b/Golds/encodeFP4_tie_RTZ_-5.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-5.0.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 -rRTZ -- -5.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -4.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 0
+      Hex layout: E
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1p+2
+           Octal: -0o4
+         Decimal: -4.0
+             Hex: -0x4
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -5.0 was rounded to -4.0.
diff --git a/Golds/encodeFP4_tie_RTZ_-7.0.gold b/Golds/encodeFP4_tie_RTZ_-7.0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_tie_RTZ_-7.0.gold
@@ -0,0 +1,19 @@
+Arguments: -ffp4 -rRTZ -- -7.0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -6.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 11 1
+      Hex layout: F
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: 2 (Stored: 3, Bias: 1)
+  Classification: FP_NORMAL
+          Binary: -0b1.1p+2
+           Octal: -0o6
+         Decimal: -6.0
+             Hex: -0x6
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of -7.0 is out of range, saturated to -6.0.
+                  The representable range is [-6, 6].
diff --git a/Golds/encodeFP4_zero1.gold b/Golds/encodeFP4_zero1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_zero1.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 0 00 0
+      Hex layout: 0
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Positive
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0" was exact. No rounding happened.
diff --git a/Golds/encodeFP4_zero2.gold b/Golds/encodeFP4_zero2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeFP4_zero2.gold
@@ -0,0 +1,18 @@
+Arguments: -ffp4 --  -0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = -0.0 :: FP4
+                  3 21 0
+                  S E2 S
+   Binary layout: 1 00 0
+      Hex layout: 8
+       Precision: 2 exponent bits, 1 significand bit
+            Sign: Negative
+        Exponent: -1 (Stored: 0, Bias: 1)
+  Classification: FP_ZERO
+          Binary: -0b0.0
+           Octal: -0o0.0
+         Decimal: -0.0
+             Hex: -0o0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "-0" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_+inf.gold b/Golds/encodeUE5M3_+inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_+inf.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3    inf
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 111
+      Hex layout: FF
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN
+           Value: NaN
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: The input value Infinity is out of bounds, and hence becomes NaN.
+                  The representable range is [0, 114688].
diff --git a/Golds/encodeUE5M3_-inf.gold b/Golds/encodeUE5M3_-inf.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_-inf.gold
@@ -0,0 +1,7 @@
+Arguments: -fue5m3 -- -inf
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  UE5M3 has no representation for negative values.
+  The representable range is [0, 114688], plus NaN.
diff --git a/Golds/encodeUE5M3_dev.gold b/Golds/encodeUE5M3_dev.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_dev.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  65536
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "65536" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_exact.gold b/Golds/encodeUE5M3_exact.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_exact.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  2.5
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.5 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 10000 010
+      Hex layout: 82
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 16, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.01p1
+           Octal: 0o2.4
+         Decimal: 2.5
+             Hex: 0x2.8
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "2.5" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_hex.gold b/Golds/encodeUE5M3_hex.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_hex.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  0x1.8p1
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 3.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 10000 100
+      Hex layout: 84
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 16, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.1p1
+           Octal: 0o3
+         Decimal: 3.0
+             Hex: 0x3
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0x1.8p1" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_ieeemax.gold b/Golds/encodeUE5M3_ieeemax.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_ieeemax.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  61440
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 61440 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11110 111
+      Hex layout: F7
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 15 (Stored: 30, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111p15
+           Octal: 0o1.7p15
+         Decimal: 61440
+             Hex: 0xfp12
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "61440" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_ieeernd.gold b/Golds/encodeUE5M3_ieeernd.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_ieeernd.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  61441
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 61440 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11110 111
+      Hex layout: F7
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 15 (Stored: 30, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111p15
+           Octal: 0o1.7p15
+         Decimal: 61440
+             Hex: 0xfp12
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 61441.0 was rounded to 61440.0.
diff --git a/Golds/encodeUE5M3_max.gold b/Golds/encodeUE5M3_max.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_max.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  114688
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 114688.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 110
+      Hex layout: FE
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.11p+16
+           Octal: 0o3.4p+15
+         Decimal: 114688.0
+             Hex: 0x1.cp+16
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "114688" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_nan.gold b/Golds/encodeUE5M3_nan.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_nan.gold
@@ -0,0 +1,15 @@
+Arguments: -fue5m3    nan
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 111
+      Hex layout: FF
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN
+           Value: NaN
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "nan" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_neg.gold b/Golds/encodeUE5M3_neg.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_neg.gold
@@ -0,0 +1,7 @@
+Arguments: -fue5m3 -- -5
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  UE5M3 has no representation for negative values.
+  The representable range is [0, 114688], plus NaN.
diff --git a/Golds/encodeUE5M3_one.gold b/Golds/encodeUE5M3_one.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_one.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  1
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 000
+      Hex layout: 78
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "1" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_oob.gold b/Golds/encodeUE5M3_oob.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_oob.gold
@@ -0,0 +1,16 @@
+Arguments: -fue5m3 --  114689
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = NaN :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 111
+      Hex layout: FF
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NAN
+           Value: NaN
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: The input value 114689.0 is out of bounds, and hence becomes NaN.
+                  The representable range is [0, 114688].
diff --git a/Golds/encodeUE5M3_sub.gold b/Golds/encodeUE5M3_sub.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_sub.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  0x1p-17
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.000007629 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 001
+      Hex layout: 01
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-17
+           Octal: 0o2p-18
+         Decimal: 0.000007629
+             Hex: 0x8p-20
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0x1p-17" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_subrnd.gold b/Golds/encodeUE5M3_subrnd.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_subrnd.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  1e-10
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 000
+      Hex layout: 00
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -15 (Stored: 0, Bias: 15)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.0e-10 was rounded to 0.0.
diff --git a/Golds/encodeUE5M3_tie_RNA_binade.gold b/Golds/encodeUE5M3_tie_RNA_binade.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNA_binade.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNA -- 1.9375
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 10000 000
+      Hex layout: 80
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 16, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.9375 was rounded to 2.0.
diff --git a/Golds/encodeUE5M3_tie_RNA_dev0.gold b/Golds/encodeUE5M3_tie_RNA_dev0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNA_dev0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNA -- 63488
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 63488.0 was rounded to 65536.0.
diff --git a/Golds/encodeUE5M3_tie_RNA_dev1.gold b/Golds/encodeUE5M3_tie_RNA_dev1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNA_dev1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNA -- 69632
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 73728.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 001
+      Hex layout: F9
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.001p+16
+           Octal: 0o2.2p+15
+         Decimal: 73728.0
+             Hex: 0x1.2p+16
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 69632.0 was rounded to 73728.0.
diff --git a/Golds/encodeUE5M3_tie_RNA_norm.gold b/Golds/encodeUE5M3_tie_RNA_norm.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNA_norm.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNA -- 1.0625
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.125 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 001
+      Hex layout: 79
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.001
+           Octal: 0o1.1
+         Decimal: 1.125
+             Hex: 0x1.2
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.0625 was rounded to 1.125.
diff --git a/Golds/encodeUE5M3_tie_RNA_sub0.gold b/Golds/encodeUE5M3_tie_RNA_sub0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNA_sub0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNA -- 0x1p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.000007629 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 001
+      Hex layout: 01
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-17
+           Octal: 0o2p-18
+         Decimal: 0.000007629
+             Hex: 0x8p-20
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 3.814697265625e-6 was rounded to 7.62939453125e-6.
diff --git a/Golds/encodeUE5M3_tie_RNA_sub1.gold b/Golds/encodeUE5M3_tie_RNA_sub1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNA_sub1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNA -- 0x3p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.00001526 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 010
+      Hex layout: 02
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-16
+           Octal: 0o4p-18
+         Decimal: 0.00001526
+             Hex: 0x1p-16
+   Rounding mode: RNA: Round nearest ties to away.
+            Note: Original value of 1.1444091796875e-5 was rounded to 1.52587890625e-5.
diff --git a/Golds/encodeUE5M3_tie_RNE_binade.gold b/Golds/encodeUE5M3_tie_RNE_binade.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNE_binade.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNE -- 1.9375
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 10000 000
+      Hex layout: 80
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 16, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.9375 was rounded to 2.0.
diff --git a/Golds/encodeUE5M3_tie_RNE_dev0.gold b/Golds/encodeUE5M3_tie_RNE_dev0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNE_dev0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNE -- 63488
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 63488.0 was rounded to 65536.0.
diff --git a/Golds/encodeUE5M3_tie_RNE_dev1.gold b/Golds/encodeUE5M3_tie_RNE_dev1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNE_dev1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNE -- 69632
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 69632.0 was rounded to 65536.0.
diff --git a/Golds/encodeUE5M3_tie_RNE_norm.gold b/Golds/encodeUE5M3_tie_RNE_norm.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNE_norm.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNE -- 1.0625
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 000
+      Hex layout: 78
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.0625 was rounded to 1.0.
diff --git a/Golds/encodeUE5M3_tie_RNE_sub0.gold b/Golds/encodeUE5M3_tie_RNE_sub0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNE_sub0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNE -- 0x1p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 000
+      Hex layout: 00
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -15 (Stored: 0, Bias: 15)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 3.814697265625e-6 was rounded to 0.0.
diff --git a/Golds/encodeUE5M3_tie_RNE_sub1.gold b/Golds/encodeUE5M3_tie_RNE_sub1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RNE_sub1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRNE -- 0x3p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.00001526 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 010
+      Hex layout: 02
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-16
+           Octal: 0o4p-18
+         Decimal: 0.00001526
+             Hex: 0x1p-16
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Original value of 1.1444091796875e-5 was rounded to 1.52587890625e-5.
diff --git a/Golds/encodeUE5M3_tie_RTN_binade.gold b/Golds/encodeUE5M3_tie_RTN_binade.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTN_binade.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTN -- 1.9375
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.875 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 111
+      Hex layout: 7F
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111
+           Octal: 0o1.7
+         Decimal: 1.875
+             Hex: 0x1.e
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.9375 was rounded to 1.875.
diff --git a/Golds/encodeUE5M3_tie_RTN_dev0.gold b/Golds/encodeUE5M3_tie_RTN_dev0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTN_dev0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTN -- 63488
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 61440 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11110 111
+      Hex layout: F7
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 15 (Stored: 30, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111p15
+           Octal: 0o1.7p15
+         Decimal: 61440
+             Hex: 0xfp12
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 63488.0 was rounded to 61440.0.
diff --git a/Golds/encodeUE5M3_tie_RTN_dev1.gold b/Golds/encodeUE5M3_tie_RTN_dev1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTN_dev1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTN -- 69632
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 69632.0 was rounded to 65536.0.
diff --git a/Golds/encodeUE5M3_tie_RTN_norm.gold b/Golds/encodeUE5M3_tie_RTN_norm.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTN_norm.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTN -- 1.0625
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 000
+      Hex layout: 78
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.0625 was rounded to 1.0.
diff --git a/Golds/encodeUE5M3_tie_RTN_sub0.gold b/Golds/encodeUE5M3_tie_RTN_sub0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTN_sub0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTN -- 0x1p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 000
+      Hex layout: 00
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -15 (Stored: 0, Bias: 15)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 3.814697265625e-6 was rounded to 0.0.
diff --git a/Golds/encodeUE5M3_tie_RTN_sub1.gold b/Golds/encodeUE5M3_tie_RTN_sub1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTN_sub1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTN -- 0x3p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.000007629 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 001
+      Hex layout: 01
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-17
+           Octal: 0o2p-18
+         Decimal: 0.000007629
+             Hex: 0x8p-20
+   Rounding mode: RTN: Round towards negative infinity.
+            Note: Original value of 1.1444091796875e-5 was rounded to 7.62939453125e-6.
diff --git a/Golds/encodeUE5M3_tie_RTP_binade.gold b/Golds/encodeUE5M3_tie_RTP_binade.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTP_binade.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTP -- 1.9375
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 2.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 10000 000
+      Hex layout: 80
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 1 (Stored: 16, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p1
+           Octal: 0o2
+         Decimal: 2.0
+             Hex: 0x2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.9375 was rounded to 2.0.
diff --git a/Golds/encodeUE5M3_tie_RTP_dev0.gold b/Golds/encodeUE5M3_tie_RTP_dev0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTP_dev0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTP -- 63488
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 63488.0 was rounded to 65536.0.
diff --git a/Golds/encodeUE5M3_tie_RTP_dev1.gold b/Golds/encodeUE5M3_tie_RTP_dev1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTP_dev1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTP -- 69632
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 73728.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 001
+      Hex layout: F9
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.001p+16
+           Octal: 0o2.2p+15
+         Decimal: 73728.0
+             Hex: 0x1.2p+16
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 69632.0 was rounded to 73728.0.
diff --git a/Golds/encodeUE5M3_tie_RTP_norm.gold b/Golds/encodeUE5M3_tie_RTP_norm.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTP_norm.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTP -- 1.0625
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.125 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 001
+      Hex layout: 79
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.001
+           Octal: 0o1.1
+         Decimal: 1.125
+             Hex: 0x1.2
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.0625 was rounded to 1.125.
diff --git a/Golds/encodeUE5M3_tie_RTP_sub0.gold b/Golds/encodeUE5M3_tie_RTP_sub0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTP_sub0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTP -- 0x1p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.000007629 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 001
+      Hex layout: 01
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-17
+           Octal: 0o2p-18
+         Decimal: 0.000007629
+             Hex: 0x8p-20
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 3.814697265625e-6 was rounded to 7.62939453125e-6.
diff --git a/Golds/encodeUE5M3_tie_RTP_sub1.gold b/Golds/encodeUE5M3_tie_RTP_sub1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTP_sub1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTP -- 0x3p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.00001526 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 010
+      Hex layout: 02
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-16
+           Octal: 0o4p-18
+         Decimal: 0.00001526
+             Hex: 0x1p-16
+   Rounding mode: RTP: Round towards positive infinity.
+            Note: Original value of 1.1444091796875e-5 was rounded to 1.52587890625e-5.
diff --git a/Golds/encodeUE5M3_tie_RTZ_binade.gold b/Golds/encodeUE5M3_tie_RTZ_binade.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTZ_binade.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTZ -- 1.9375
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.875 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 111
+      Hex layout: 7F
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111
+           Octal: 0o1.7
+         Decimal: 1.875
+             Hex: 0x1.e
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.9375 was rounded to 1.875.
diff --git a/Golds/encodeUE5M3_tie_RTZ_dev0.gold b/Golds/encodeUE5M3_tie_RTZ_dev0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTZ_dev0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTZ -- 63488
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 61440 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11110 111
+      Hex layout: F7
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 15 (Stored: 30, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1.111p15
+           Octal: 0o1.7p15
+         Decimal: 61440
+             Hex: 0xfp12
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 63488.0 was rounded to 61440.0.
diff --git a/Golds/encodeUE5M3_tie_RTZ_dev1.gold b/Golds/encodeUE5M3_tie_RTZ_dev1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTZ_dev1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTZ -- 69632
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 65536.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 11111 000
+      Hex layout: F8
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 16 (Stored: 31, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1p+16
+           Octal: 0o2p+15
+         Decimal: 65536.0
+             Hex: 0x1p+16
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 69632.0 was rounded to 65536.0.
diff --git a/Golds/encodeUE5M3_tie_RTZ_norm.gold b/Golds/encodeUE5M3_tie_RTZ_norm.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTZ_norm.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTZ -- 1.0625
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 1.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 01111 000
+      Hex layout: 78
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: 0 (Stored: 15, Bias: 15)
+  Classification: FP_NORMAL
+          Binary: 0b1
+           Octal: 0o1
+         Decimal: 1.0
+             Hex: 0x1
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.0625 was rounded to 1.0.
diff --git a/Golds/encodeUE5M3_tie_RTZ_sub0.gold b/Golds/encodeUE5M3_tie_RTZ_sub0.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTZ_sub0.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTZ -- 0x1p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 000
+      Hex layout: 00
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -15 (Stored: 0, Bias: 15)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 3.814697265625e-6 was rounded to 0.0.
diff --git a/Golds/encodeUE5M3_tie_RTZ_sub1.gold b/Golds/encodeUE5M3_tie_RTZ_sub1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_tie_RTZ_sub1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 -rRTZ -- 0x3p-18
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.000007629 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 001
+      Hex layout: 01
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -14 (Subnormal, with fixed exponent value. Stored: 0, Bias: 15)
+  Classification: FP_SUBNORMAL
+          Binary: 0b1p-17
+           Octal: 0o2p-18
+         Decimal: 0.000007629
+             Hex: 0x8p-20
+   Rounding mode: RTZ: Round towards zero.
+            Note: Original value of 1.1444091796875e-5 was rounded to 7.62939453125e-6.
diff --git a/Golds/encodeUE5M3_zero1.gold b/Golds/encodeUE5M3_zero1.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_zero1.gold
@@ -0,0 +1,18 @@
+Arguments: -fue5m3 --  0
+Exit code: ExitSuccess
+Satisfiable. Model:
+  ENCODED = 0.0 :: UE5M3
+                  76543 210
+                  -E5-- S3-
+   Binary layout: 00000 000
+      Hex layout: 00
+       Precision: 5 exponent bits, 3 significand bits
+            Sign: Positive (always)
+        Exponent: -15 (Stored: 0, Bias: 15)
+  Classification: FP_ZERO
+          Binary: 0b0.0
+           Octal: 0o0.0
+         Decimal: 0.0
+             Hex: 0x0
+   Rounding mode: RNE: Round nearest ties to even.
+            Note: Conversion from "0" was exact. No rounding happened.
diff --git a/Golds/encodeUE5M3_zero2.gold b/Golds/encodeUE5M3_zero2.gold
new file mode 100644
--- /dev/null
+++ b/Golds/encodeUE5M3_zero2.gold
@@ -0,0 +1,7 @@
+Arguments: -fue5m3 --  -0
+Exit code: ExitFailure 1
+
+STDERR:
+ERROR:
+  UE5M3 has no representation for negative values.
+  The representable range is [0, 114688], plus NaN.
diff --git a/crackNum.cabal b/crackNum.cabal
--- a/crackNum.cabal
+++ b/crackNum.cabal
@@ -1,6 +1,6 @@
-Cabal-version      : 2.2
+Cabal-version      : 2.4
 Name               : crackNum
-Version            : 4.6
+Version            : 4.7
 Synopsis           : Crack various integer and floating-point data formats
 Description        : Crack IEEE-754 and other float formats and arbitrary sized words and integers, showing the layout.
                      Along with a command-line interface on any platform, native MacOS and Windows GUIs, a Tcl-based Linux GUI, and a browser front-end are available as well:
@@ -18,7 +18,7 @@
 Copyright          : Levent Erkok
 Category           : Tools
 Build-type         : Simple
-Extra-Source-Files : README.md, COPYRIGHT, crackNum.vim
+Extra-Source-Files : README.md, COPYRIGHT, crackNum.vim, Golds/*.gold
 Extra-Doc-Files    : CHANGES.md
 
 -- The Tcl/Tk GUI is a data-file (not merely an extra-source-file) so that it is
@@ -36,7 +36,7 @@
    hs-source-dirs  : src
    ghc-options     : -Wall -Wunused-packages
    build-depends   : base >= 4.11 && < 5, libBF, ghc, sbv >= 11.0
-                   , tasty, tasty-golden, filepath, directory, process, deepseq
+                   , tasty, tasty-golden, tasty-hunit, filepath, directory, process, deepseq
    other-modules   : Paths_crackNum
                    , CrackNum.Types
                    , CrackNum.Formats
@@ -48,3 +48,14 @@
                    , CrackNum.Encode
                    , CrackNum.TestSuite
    autogen-modules : Paths_crackNum
+
+Test-Suite crackNum-tests
+   type            : exitcode-stdio-1.0
+   main-is         : TestMain.hs
+   default-language: Haskell2010
+   hs-source-dirs  : test, src
+   ghc-options     : -Wall -Wunused-packages
+   build-depends   : base >= 4.11 && < 5
+                   , tasty, tasty-golden, tasty-hunit, filepath, directory, process
+   build-tool-depends: crackNum:crackNum
+   other-modules   : CrackNum.TestSuite
diff --git a/src/CrackNum/Encode.hs b/src/CrackNum/Encode.hs
--- a/src/CrackNum/Encode.hs
+++ b/src/CrackNum/Encode.hs
@@ -19,15 +19,19 @@
    ) where
 
 import Control.DeepSeq (rnf)
-import Data.List       (isPrefixOf, isSuffixOf, intercalate)
+import Control.Monad   (guard)
+import Data.Char       (isDigit, isHexDigit, isSpace, toLower)
+import Data.List       (dropWhileEnd, isPrefixOf, isSuffixOf, intercalate)
 
 import qualified Control.Exception as C
 
+import GHC.Float      (double2Float)
 import GHC.Utils.Misc (readHexRational)
 import GHC.Real       (Ratio((:%)))
 
 import LibBF
 import Numeric
+import Text.Read (readMaybe)
 
 import Data.SBV           hiding (crack, satCmd)
 import Data.SBV.Float     hiding (FP)
@@ -38,6 +42,136 @@
 import CrackNum.Utils
 import CrackNum.Output
 
+-- | Parse an ordinary decimal as an exact rational. Using Read Double here
+-- would round before the destination format gets to apply its own rounding
+-- mode; that is observable for inputs just to either side of a midpoint.
+readDecimalRational :: String -> Maybe Rational
+readDecimalRational raw = do
+   let trimmed = dropWhileEnd isSpace (dropWhile isSpace raw)
+       (sgn, unsigned) = case trimmed of
+                           '-' : rest -> (-1, rest)
+                           '+' : rest -> ( 1, rest)
+                           _          -> ( 1, trimmed)
+       (mantissa, exponentPart) = break (`elem` "eE") unsigned
+
+   decimalExponent <- case exponentPart of
+                        ""       -> pure 0
+                        _ : rest -> signedInteger rest
+
+   let (whole, dotAndFraction) = break (== '.') mantissa
+   fraction <- case dotAndFraction of
+                 ""       -> pure ""
+                 '.' : xs -> guard ('.' `notElem` xs) >> pure xs
+                 _        -> Nothing
+
+   guard (not (null whole && null fraction))
+   guard (all isDigit whole && all isDigit fraction)
+
+   let digits      = (if null whole then "0" else whole) ++ fraction
+       significant = dropWhile (== '0') digits
+       decimalShift = decimalExponent - toInteger (length fraction)
+       decimalOrder = toInteger (length significant) + decimalShift
+
+       -- These exact rationals are used only by formats whose entire finite
+       -- range lies between roughly 1e-39 and 1e6. Clamp exponents far beyond
+       -- that envelope before computing 10^n: the sentinel has identical
+       -- rounding/range behavior and prevents input such as 1e999999999 from
+       -- attempting an impossibly large allocation.
+       envelope = 400
+
+   magnitude <- if null significant
+                   then pure 0
+                   else if decimalOrder > envelope
+                           then pure (10 ^ envelope)
+                           else if decimalOrder < negate envelope
+                                   then pure (1 % (10 ^ envelope))
+                                   else do coefficient <- readMaybe digits
+                                           let decimalPlaces = negate decimalShift
+                                           pure $ if decimalPlaces >= 0
+                                                     then coefficient % (10 ^ decimalPlaces)
+                                                     else (coefficient * 10 ^ negate decimalPlaces) % 1
+   pure $ fromInteger sgn * magnitude
+ where signedInteger ('+' : xs) = readMaybe xs
+       signedInteger xs         = readMaybe xs
+
+-- | Parse a finite decimal or hexadecimal floating literal exactly, retaining
+-- the spelling of negative zero separately because Rational has only one zero.
+readExactRational :: String -> IO (Rational, Bool)
+readExactRational inp = case readDecimalRational inp of
+   Just r  -> pure (r, r == 0 && negativeSyntax inp)
+   Nothing -> case readHexIntegerRational inp of
+                Just r  -> pure (r, r == 0 && negativeSyntax inp)
+                Nothing -> do let r = readHexRational (normalizeHexPrefix inp)
+                              ok <- (rnf r `seq` pure True)
+                                      `C.catch` (\(_ :: C.SomeException) -> pure False)
+                              if ok then pure (r, r == 0 && negativeSyntax inp)
+                                    else unrecognized inp
+ where negativeSyntax = isPrefixOf "-" . dropWhile isSpace
+
+-- Haskell's Read instances accept integral hexadecimal syntax as a floating
+-- value. Preserve that behavior without first rounding through Float/Double.
+readHexIntegerRational :: String -> Maybe Rational
+readHexIntegerRational raw = do
+   let trimmed = dropWhileEnd isSpace (dropWhile isSpace raw)
+       (sgn, unsigned) = case trimmed of
+                           '-' : rest -> (-1, rest)
+                           '+' : rest -> ( 1, rest)
+                           _          -> ( 1, trimmed)
+   digits <- case unsigned of
+               '0' : x : rest | x `elem` "xX" -> pure rest
+               _                                -> Nothing
+   guard (not (null digits) && all isHexDigit digits)
+   value <- case readHex digits of
+              [(n, "")] -> pure n
+              _         -> Nothing
+   pure $ fromInteger (sgn * value)
+
+-- GHC's hex-float reader accepts the conventional lowercase 0x prefix only.
+-- Haskell's ordinary numeric reader accepted 0X too, so retain that spelling
+-- when an SP/DP input falls through to exact hexadecimal parsing.
+normalizeHexPrefix :: String -> String
+normalizeHexPrefix raw = case unsigned of
+   '0' : 'X' : rest -> leading ++ sign ++ "0x" ++ rest
+   _                -> raw
+ where (leading, signed) = span isSpace raw
+       (sign, unsigned)  = case signed of
+                             s : rest | s `elem` "+-" -> ([s], rest)
+                             _                        -> ("", signed)
+
+data NumberInput = InputNaN
+                 | InputPosInf
+                 | InputNegInf
+                 | InputFinite Rational Bool -- ^ exact value, and whether zero was spelled negative
+
+readNumberInput :: String -> IO NumberInput
+readNumberInput inp = case normalized of
+   "nan"       -> pure InputNaN
+   "inf"       -> pure InputPosInf
+   "infinity"  -> pure InputPosInf
+   "-inf"      -> pure InputNegInf
+   "-infinity" -> pure InputNegInf
+   _           -> uncurry InputFinite <$> readExactRational inp
+ where normalized = map toLower $ dropWhileEnd isSpace $ dropWhile isSpace inp
+
+-- | Constrain a symbolic IEEE value to the correctly rounded cast of an exact
+-- rational. Keeping the real value symbolic lets z3 apply the requested IEEE
+-- rounding mode without an intermediate host Float or Double conversion.
+rationalConstraint :: Int -> Int -> RM -> Rational -> Predicate
+rationalConstraint i j rm (a :% b) = do
+   let k = KFP i j
+   sx <- svNewVar k "ENCODED"
+   sr <- sReal_
+   let top, bot :: SReal
+       top = sFromIntegral (literal a)
+       bot = sFromIntegral (literal b)
+       val = top / bot
+       rounded st = do msv <- sbvToSV st (toSBVRM rm)
+                       xsv <- sbvToSV st sr
+                       newExpr st k (SBVApp (IEEEFP (FP_Cast KReal k msv)) [xsv])
+   constrain $ sr .== val
+   constrain (SBV (sx `svEqual` SVal k (Right (cache rounded))) :: SBool)
+   pure sTrue
+
 -- | Encoding
 encodeLane :: Bool -> Int -> NKind -> RM -> String -> IO ()
 encodeLane debug lanes num rm inp
@@ -87,10 +221,18 @@
                         Just s  -> putStrLn $ "            Note: Conversion from " ++ show inp ++ " was not faithful. Status: " ++ s ++ "."
 
         ef :: FP -> Bool -> IO ()
-        ef SP _ = case reads (fixup True inp) of
-                    [(v :: Float, "")] -> do print =<< run v (p v)
-                                             note $ snd $ convert 8 24
-                    _                  -> ef (FP 8 24) False
+        -- Parse decimal input with LibBF at the destination precision. Going through
+        -- Haskell's Read Float/Double would round to nearest-even before we ever saw
+        -- the user's rounding mode. Since every Float is exactly representable as a
+        -- Double, bfToDouble followed by double2Float faithfully materializes the
+        -- already-rounded single-precision value.
+        ef SP _ = do let (bf, mbS) = convert 8 24
+                     if bfIsNaN bf && fixup False inp /= "NaN"
+                        then ef (FP 8 24) False  -- hexadecimal float: exact SMT cast
+                        else do let (d, _) = bfToDouble NearEven bf
+                                    v      = double2Float d
+                                print =<< run v (p v)
+                                note mbS
          where p :: Float -> Predicate
                p f = do x <- sFloat "ENCODED"
                         pure $ x .=== literal f
@@ -98,10 +240,14 @@
                run f | isNaN f = satCmdNaN 8 24
                      | True    = satCmd
 
-        ef DP _ = case reads (fixup True inp) of
-                    [(v :: Double, "")] -> do print =<< run v (p v)
-                                              note $ snd $ convert 11 53
-                    _                   -> ef (FP 11 53) False
+        -- As for SP, let LibBF apply the selected mode before converting the exact
+        -- destination value to the host Double used by SBV's native presentation.
+        ef DP _ = do let (bf, mbS) = convert 11 53
+                     if bfIsNaN bf && fixup False inp /= "NaN"
+                        then ef (FP 11 53) False  -- hexadecimal float: exact SMT cast
+                        else do let (v, _) = bfToDouble NearEven bf
+                                print =<< run v (p v)
+                                note mbS
          where p :: Double -> Predicate
                p d = do x <- sDouble "ENCODED"
                         pure $ x .=== literal d
@@ -112,9 +258,8 @@
         ef (FP i j) wasE5M2 = do let (v, mbS) = convert i j
                                  if bfIsNaN v && fixup False inp /= "NaN"
                                     then -- maybe it's a hexfloat?
-                                         do let hr = readHexRational inp
-                                            () <- (rnf hr `seq` return ()) `C.catch` (\(_ :: C.SomeException) -> unrecognized inp)
-                                            res <- satCmd (pRat hr)
+                                         do (hr, _) <- readExactRational inp
+                                            res <- satCmd (rationalConstraint i j rm hr)
                                             if wasE5M2 then printAs E5M2 res
                                                        else print res
                                     else do let run | bfIsNaN v = satCmdNaN i j
@@ -128,20 +273,6 @@
                                   sx <- svNewVar k "ENCODED"
                                   pure $ SBV $ sx `svStrongEqual` SVal k (Left (CV k (CFP (fpFromBigFloat i j bf))))
 
-                        pRat :: Rational -> Predicate
-                        pRat (a :% b) = do let k = KFP i j
-                                           sx <- svNewVar k "ENCODED"
-                                           sr <- sReal_
-                                           let top, bot :: SReal
-                                               top = sFromIntegral (literal a)
-                                               bot = sFromIntegral (literal b)
-                                               val = top / bot
-                                               r st = do msv <- sbvToSV st (toSBVRM rm)
-                                                         xsv <- sbvToSV st sr
-                                                         newExpr st k (SBVApp (IEEEFP (FP_Cast KReal k msv)) [xsv])
-                                           pure $   sr .== val
-                                                .&& SBV (sx `svEqual` SVal k (Right (cache r)))
-
         ef E5M2    _ = ef (FP 5 3) True -- 3 is intentional; the format ignores the sign storage, but SBV doesn't, following SMTLib
 
         ef E4M3    _ = encodeE4M3 debug rm inp
@@ -156,16 +287,21 @@
 
 -- Encoding E4M3 is tricky, because of deviation from IEEE. So, we do a case analysis, mostly
 encodeE4M3 :: Bool -> RM -> String -> IO ()
-encodeE4M3 debug rm inp = case reads (fixup True inp) of
-                            [(v :: Double, "")] -> analyze v
-                            _                   -> -- maybe it's a hexfloat?
-                                                   do let hr = readHexRational inp
-                                                      (rnf hr `seq` analyze (fromRational hr))
-                                                        `C.catch` (\(_ :: C.SomeException) -> unrecognized inp)
+encodeE4M3 debug rm inp = do
+   parsed <- readNumberInput inp
+   case parsed of
+     InputNaN          -> getNaN >>= putStrLn . fixNaN . fixEncoded
+     InputPosInf       -> infinite
+     InputNegInf       -> infinite
+     InputFinite v neg -> range v neg
  where config = z3{ crackNum = True
                   , verbose  = debug
+                  , isNonModelVar = (/= "ENCODED")
                   }
 
+       infinite = do getNaN >>= putStrLn . fixNaN . fixEncoded
+                     putStrLn "            Note: The input value was infinite, which is not representable in E4M3."
+
        fixEncoded :: SatResult -> String
        fixEncoded = retype E4M3
 
@@ -177,17 +313,6 @@
                               do x :: SFloatingPoint 4 4 <- sFloatingPoint "ENCODED"
                                  constrain $ fpIsNaN x
 
-       analyze :: Double -> IO ()
-       analyze v
-         -- NaN has two representations, with surface value S.1111.111; we use 0x7F for simplicity
-         | isNaN v
-         = getNaN >>= putStrLn . fixNaN . fixEncoded
-         | isInfinite v
-         = do getNaN >>= putStrLn . fixNaN . fixEncoded
-              putStrLn "            Note: The input value was infinite, which is not representable in E4M3."
-         | True
-         = range v
-
        -- This list is sorted on the first value.
        -- Final bool is True if this value is considered "even" for rounding purposes
        extraVals :: [(ExtraE3M4, String, Bool)]
@@ -203,40 +328,50 @@
                      , (E448, "1111110", True)
                      ]
 
-       -- Pick the value we land on
-       pick v = case [p | (d, p) <- dists, d == minVal] of
-                  [x]    -> x
-                  [x, y] -> choose v x y
-                  -- The following two can't happen, but just in case:
-                  []     -> error $ "encodeE4M3: Empty list of candidates for " ++ show v  -- Can't happen
-                  cands  -> error $ "encodeE4M3: More than two candidates for " ++ show v ++ ": " ++ show cands
-         where dists  = [(abs (v - toD ev), p) | p@(ev, _, _) <- extraVals]
-               minVal = minimum $ map fst dists
+       -- Pick the value we land on. Directed modes choose an adjacent endpoint
+       -- for every inexact input; nearest modes compare distances and use their
+       -- tie rule only when those distances are equal.
+       pick v = case [p | p@(ev, _, _) <- extraVals, value ev == v] of
+                  [exact] -> exact
+                  []      -> case break (\(ev, _, _) -> value ev > v) extraVals of
+                               (lowers, upper : _) -> case reverse lowers of
+                                                       lower : _ -> choose lower upper
+                                                       []        -> noAdjacent
+                               _                   -> noAdjacent
+                  cands   -> error $ "encodeE4M3: Multiple exact candidates for " ++ show v ++ ": " ++ show cands
+         where value ev = toRational (toD ev)
 
-       -- choose is called if we're smack in between the two values given. Then, we pick
-       -- depending on the rounding mode. Note that p1 < p2 is guaranteed here.
-       choose :: Double -> (ExtraE3M4, String, Bool) -> (ExtraE3M4, String, Bool) -> (ExtraE3M4, String, Bool)
-       choose v p1@(_, _, eo1) p2@(_, _, eo2) =
-           let isNegative = v < 0 || isNegativeZero v
-           in case rm of
-               RNE  -> case (eo1, eo2) of
-                         (True,  False) -> p1
-                         (False, True)  -> p2
-                         _              -> error $ "encodeE4M3: RNE can't pick between values: " ++ show (v, p1, p2)
-               RNA  -> if isNegative then p1 else p2
-               RTP  -> p2
-               RTN  -> p1
-               RTZ  -> if isNegative then p2 else p1
+               noAdjacent = error $ "encodeE4M3: No adjacent candidates for " ++ show v
 
-       range v
+               choose p1 p2 = case rm of
+                 RTP -> p2
+                 RTN -> p1
+                 RTZ -> if v < 0 then p2 else p1
+                 RNE -> nearest (evenTie p1 p2) p1 p2
+                 RNA -> nearest (if v < 0 then p1 else p2) p1 p2
+
+               nearest tie p1@(ev1, _, _) p2@(ev2, _, _)
+                 = case compare (v - value ev1) (value ev2 - v) of
+                     LT -> p1
+                     EQ -> tie
+                     GT -> p2
+
+               evenTie p1@(_, _, True)  _                  = p1
+               evenTie _                  p2@(_, _, True)  = p2
+               evenTie p1                 p2                = error $ "encodeE4M3: RNE can't pick between values: " ++ show (v, p1, p2)
+
+       range v isNegZero
          | v < -448 || v > 448   -- Out-of-bounds becomes NaN
          = do getNaN >>= putStrLn . fixNaN . fixEncoded
-              putStrLn $ "            Note: The input value " ++ show v ++ " is out of bounds, and hence becomes NaN"
+              putStrLn $ "            Note: The input value " ++ show (fromRational v :: Double) ++ " is out of bounds, and hence becomes NaN"
               putStrLn   "                  The representable range is [-448, 448]"
 
          | v >= -240 && v <= 240   -- Fits into regular 4+4 format, so just decode
-         = do res <- satWith config $ do x :: SFloatingPoint 4 4 <- sFloatingPoint "ENCODED"
-                                         constrain $ x .== fromSDouble sRNE (literal v)
+         = do res <- satWith config $ if isNegZero
+                                    then do x :: SFloatingPoint 4 4 <- sFloatingPoint "ENCODED"
+                                            constrain $ x .== fromSDouble (toSBVRM rm) (literal (-0.0 :: Double))
+                                            pure sTrue
+                                    else rationalConstraint 4 4 rm v
               putStrLn $ fixEncoded res
 
          -- Otherwise, we're in the range [-448, -240)  OR (240, 448]
@@ -275,35 +410,36 @@
               putStrLn $ "         Decimal: " ++ bDec
               putStrLn $ "             Hex: " ++ bHex
               putStrLn $ "   Rounding mode: " ++ show rm
-              putStrLn $ "            Note: Original value of " ++ show v ++ ", represented as E4M3 special value"
+              putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ ", represented as E4M3 special value"
 
 -- Likewise encoding FP4 is tricky since it deviates from IEEE. But luckily there aren't too many
 -- values to worry about here: There are precisely 8 magnitudes, so we simply round by hand.
 encodeFP4 :: Bool -> RM -> String -> IO ()
-encodeFP4 debug rm inp = case reads (fixup True inp) of
-                           [(v :: Double, "")] -> analyze v
-                           _                   -> -- maybe it's a hexfloat? Note that we must scope the
-                                                  -- catch over the parse only: analyze can legitimately
-                                                  -- die, and die throws an exit-exception of its own.
-                                                  do let hr = readHexRational inp
-                                                     ok <- (rnf hr `seq` pure True)
-                                                             `C.catch` (\(_ :: C.SomeException) -> pure False)
-                                                     if ok then analyze (fromRational hr)
-                                                           else unrecognized inp
+encodeFP4 debug rm inp = do
+   parsed <- readNumberInput inp
+   case parsed of
+     InputNaN          -> die ["FP4 has no representation for NaN."]
+     InputPosInf       -> infinite
+     InputNegInf       -> infinite
+     InputFinite v neg -> analyze v neg
  where config = z3{ crackNum = True
                   , verbose  = debug
                   }
 
+       infinite = die [ "FP4 has no representation for infinity."
+                      , "The representable range is [-6, 6]."
+                      ]
+
        -- The magnitudes FP4 can represent, in increasing order. Note that the index of each
        -- magnitude is precisely the value of the low 3 bits of its encoding. The last two
        -- (4 and 6) are where FP4 deviates from IEEE, which would call them infinity and NaN.
-       mags :: [Double]
+       mags :: [Rational]
        mags = [0, 0.5, 1, 1.5, 2, 3, 4, 6]
 
        -- Round the magnitude to the index of one of the representable magnitudes, honoring
        -- the rounding mode. Note that rounding a negative value towards +oo is the same thing
        -- as rounding its magnitude towards 0; hence the need for the sign here.
-       roundMag :: Bool -> Double -> Int
+       roundMag :: Bool -> Rational -> Int
        roundMag isNeg m
          | m >= 6                                     -- Larger than we can represent; saturate
          = 7
@@ -326,23 +462,17 @@
                               GT -> hi
                               EQ -> tie
 
-       analyze :: Double -> IO ()
-       analyze v
-         | isNaN v
-         = die [ "FP4 has no representation for NaN." ]
-         | isInfinite v
-         = die [ "FP4 has no representation for infinity."
-               , "The representable range is [-6, 6]."
-               ]
-         | True
-         = do let isNeg = v < 0 || isNegativeZero v
-                  idx   = roundMag isNeg (abs v)
-                  t     = (if isNeg then negate else id) (mags !! idx)
+       analyze :: Rational -> Bool -> IO ()
+       analyze v isNegZero = do
+          let isNeg = v < 0 || isNegZero
+              idx   = roundMag isNeg (abs v)
+              mag   = mags !! idx
+              t     = (if isNeg then negate else id) (fromRational mag :: Double)
 
-              if idx >= 6 then deviant isNeg idx
-                          else regular t
+          if idx >= 6 then deviant isNeg idx
+                      else regular t
 
-              trailer v t
+          trailer v mag t
 
        -- Everything with magnitude at most 3 is a bona-fide IEEE FP 2 2 value, so let SBV
        -- print it; we merely fix the type name it displays. Note that the rounding mode is
@@ -366,53 +496,47 @@
                                           then fpIsNaN x   -- 6: the NaN slot, whose sign is not observable
                                           else fpIsInfinite x .&& (if isNeg then fpIsNegative x else fpIsPositive x)
 
-              modOut debug isNeg (mags !! idx) FP4 res
+              modOut debug isNeg (fromRational (mags !! idx)) FP4 res
 
        -- Since FP4 has no infinities, out-of-range values saturate to the largest magnitude.
-       trailer :: Double -> Double -> IO ()
-       trailer v t = do putStrLn $ "   Rounding mode: " ++ show rm
-                        note
+       trailer :: Rational -> Rational -> Double -> IO ()
+       trailer v mag t = do putStrLn $ "   Rounding mode: " ++ show rm
+                            note
          where note
                 | abs v > 6
-                = do putStrLn $ "            Note: Original value of " ++ show v ++ " is out of range, saturated to " ++ show t ++ "."
+                = do putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " is out of range, saturated to " ++ show t ++ "."
                      putStrLn   "                  The representable range is [-6, 6]."
-                | v == t
+                | abs v == mag
                 = putStrLn $ "            Note: Conversion from " ++ show inp ++ " was exact. No rounding happened."
                 | True
-                = putStrLn $ "            Note: Original value of " ++ show v ++ " was rounded to " ++ show t ++ "."
+                = putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " was rounded to " ++ show t ++ "."
 
 -- | Encoding FP4E0M3. The representable values are just the integers -7 to 7, so we round
 -- the magnitude by hand, saturating anything that doesn't fit.
 encodeFP4E0M3 :: RM -> String -> IO ()
-encodeFP4E0M3 rm inp = case reads (fixup True inp) of
-                         [(v :: Double, "")] -> analyze v
-                         _                   -> -- maybe it's a hexfloat? As in encodeFP4, the catch must
-                                                -- scope over the parse only: analyze can legitimately die,
-                                                -- and die throws an exit-exception of its own.
-                                                do let hr = readHexRational inp
-                                                   ok <- (rnf hr `seq` pure True)
-                                                           `C.catch` (\(_ :: C.SomeException) -> pure False)
-                                                   if ok then analyze (fromRational hr)
-                                                         else unrecognized inp
- where analyze :: Double -> IO ()
-       analyze v
-         | isNaN v
-         = die [ "FP4E0M3 has no representation for NaN." ]
-         | isInfinite v
-         = die [ "FP4E0M3 has no representation for infinity."
-               , "The representable range is [-7, 7]."
-               ]
-         | True
-         = do let isNeg = v < 0 || isNegativeZero v
-                  mag   = roundMag isNeg (abs v)
+encodeFP4E0M3 rm inp = do
+   parsed <- readNumberInput inp
+   case parsed of
+     InputNaN          -> die ["FP4E0M3 has no representation for NaN."]
+     InputPosInf       -> infinite
+     InputNegInf       -> infinite
+     InputFinite v neg -> analyze v neg
+ where infinite = die [ "FP4E0M3 has no representation for infinity."
+                      , "The representable range is [-7, 7]."
+                      ]
 
-              putStr $ unlines $ fp4e0m3Layout "ENCODED" isNeg mag
-              trailer v isNeg mag
+       analyze :: Rational -> Bool -> IO ()
+       analyze v isNegZero = do
+          let isNeg = v < 0 || isNegZero
+              mag   = roundMag isNeg (abs v)
 
+          putStr $ unlines $ fp4e0m3Layout "ENCODED" isNeg mag
+          trailer v isNeg mag
+
        -- Round the magnitude to one of 0 .. 7, honoring the rounding mode. Note that rounding
        -- a negative value towards +oo is the same thing as rounding its magnitude towards 0;
        -- hence the need for the sign here.
-       roundMag :: Bool -> Double -> Int
+       roundMag :: Bool -> Rational -> Int
        roundMag isNeg m
          | m >= 7                 -- Larger than we can represent; saturate
          = 7
@@ -436,19 +560,19 @@
                               EQ -> tie
 
        -- Since FP4E0M3 has no infinities, out-of-range values saturate to the largest magnitude.
-       trailer :: Double -> Bool -> Int -> IO ()
+       trailer :: Rational -> Bool -> Int -> IO ()
        trailer v isNeg mag = do putStrLn $ "   Rounding mode: " ++ show rm
                                 note
          where t = (if isNeg then "-" else "") ++ show mag
 
                note
                  | abs v > 7
-                 = do putStrLn $ "            Note: Original value of " ++ show v ++ " is out of range, saturated to " ++ t ++ "."
+                 = do putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " is out of range, saturated to " ++ t ++ "."
                       putStrLn   "                  The representable range is [-7, 7]."
                  | abs v == fromIntegral mag
                  = putStrLn $ "            Note: Conversion from " ++ show inp ++ " was exact. No rounding happened."
                  | True
-                 = putStrLn $ "            Note: Original value of " ++ show v ++ " was rounded to " ++ t ++ "."
+                 = putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " was rounded to " ++ t ++ "."
 
 -- | Encoding E8M0. The representable values are the powers of two from 2^-127 to 2^127,
 -- plus NaN, so we round the exponent by hand. Rounding is always between two adjacent
@@ -456,89 +580,90 @@
 -- one) and break RNE ties toward the even /stored/ exponent. Both follow 'encodeFP4',
 -- which ties on the parity of the encoding index rather than of the value's exponent.
 encodeE8M0 :: Bool -> RM -> String -> IO ()
-encodeE8M0 debug rm inp = case reads (fixup True inp) of
-                            [(v :: Double, "")] -> analyze v
-                            _                   -> -- maybe it's a hexfloat? As in encodeFP4, the catch must
-                                                   -- scope over the parse only: analyze can legitimately die,
-                                                   -- and die throws an exit-exception of its own.
-                                                   do let hr = readHexRational inp
-                                                      ok <- (rnf hr `seq` pure True)
-                                                              `C.catch` (\(_ :: C.SomeException) -> pure False)
-                                                      if ok then analyze (fromRational hr)
-                                                            else unrecognized inp
- where smallest, largest :: Double
-       smallest = e8m0Value 0
-       largest  = e8m0Value 254
+encodeE8M0 debug rm inp = do
+   parsed <- readNumberInput inp
+   case parsed of
+     InputNaN          -> outSpecial (0/0) 255
+     InputPosInf       -> outSpecial (1/0) 254
+     InputNegInf       -> negative
+     InputFinite v neg -> analyze v neg
+ where mags :: [Rational]
+       mags = map (toRational . e8m0Value) [0 .. 254]
 
-       analyze :: Double -> IO ()
-       analyze v
-         -- NaN is representable, and uniquely so.
-         | isNaN v
-         = out 255
+       smallest, largest :: Rational
+       smallest = toRational (e8m0Value 0)
+       largest  = toRational (e8m0Value 254)
+
+       negative = die [ "E8M0 has no representation for negative values."
+                      , "The representable range is [2^-127, 2^127], plus NaN."
+                      ]
+
+       outSpecial v stored = do putStr $ unlines $ e8m0Layout debug "ENCODED" stored
+                                trailerSpecial v stored
+
+       analyze :: Rational -> Bool -> IO ()
+       analyze v isNegZero
          -- A negative is not an out-of-range magnitude: with no sign bit there is no
          -- direction to saturate towards, and clamping would quietly make it positive.
-         | v < 0 || isNegativeZero v
-         = die [ "E8M0 has no representation for negative values."
-               , "The representable range is [2^-127, 2^127], plus NaN."
-               ]
-         -- Infinity is the limiting overflow, so it saturates along with anything else
-         -- that is too large.
-         | isInfinite v || v > largest
+         | v < 0 || isNegZero
+         = negative
+         -- Infinity is handled above; a finite value that is too large saturates.
+         | v > largest
          = out 254
          -- The bottom of the range is a hard cliff: there is no zero and no subnormal
          -- below 2^-127, so zero and everything under it saturates up to it.
          | v < smallest
          = out 0
          | True
-         = out (e8m0Bias + roundExp v)
+         = out (roundMag v)
         where out stored = do putStr $ unlines $ e8m0Layout debug "ENCODED" stored
-                              trailer v stored
+                              trailerFinite v stored
 
-       -- The exponent we land on, for a v already known to be in range. 'exponent'
-       -- returns the e with v = m * 2^e and 0.5 <= m < 1, so lo is the exponent whose
-       -- power of two sits at or just below v.
-       roundExp :: Double -> Int
-       roundExp v
-         | v == twoTo lo    -- Exactly representable
-         = lo
+       roundMag :: Rational -> Int
+       roundMag v
+         | e : _ <- [i | (i, mv) <- zip [0..] mags, mv == v]
+         = e
          | True
          = case rm of
-             RTZ -> lo      -- Every value is positive, so RTZ and RTN necessarily agree
+             RTZ -> lo
              RTN -> lo
              RTP -> hi
-             RNE -> nearest (if even (lo + e8m0Bias) then lo else hi)
+             RNE -> nearest (if even lo then lo else hi)
              RNA -> nearest hi
-        where lo = exponent v - 1
+        where lo = last [i | (i, mv) <- zip [0..] mags, mv < v]
               hi = lo + 1
 
-              twoTo :: Int -> Double
-              twoTo = encodeFloat 1
-
               -- Ties are broken by the given choice; note that comparing against the sum
-              -- avoids any rounding of its own, since 2*v and 3*2^lo are both exact here.
-              nearest tie = case compare (2 * v) (twoTo lo + twoTo hi) of
+              -- avoids any rounding of its own, since all operands are exact rationals.
+              nearest tie = case compare (2 * v) (mags !! lo + mags !! hi) of
                               LT -> lo
                               GT -> hi
                               EQ -> tie
 
-       trailer :: Double -> Int -> IO ()
-       trailer v stored = do putStrLn $ "   Rounding mode: " ++ show rm
-                             note
+       trailerFinite :: Rational -> Int -> IO ()
+       trailerFinite v stored = do putStrLn $ "   Rounding mode: " ++ show rm
+                                   note
          where t = e8m0Value stored
 
                note
-                 | isNaN v
-                 = exact
-                 | isInfinite v || v > largest || v < smallest
-                 = do putStrLn $ "            Note: Original value of " ++ show v ++ " is out of range, saturated to " ++ show t ++ "."
+                 | v > largest || v < smallest
+                 = do putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " is out of range, saturated to " ++ show t ++ "."
                       putStrLn   "                  The representable range is [2^-127, 2^127]."
-                 | v == t
+                 | v == toRational t
                  = exact
                  | True
-                 = putStrLn $ "            Note: Original value of " ++ show v ++ " was rounded to " ++ show t ++ "."
+                 = putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " was rounded to " ++ show t ++ "."
 
                exact = putStrLn $ "            Note: Conversion from " ++ show inp ++ " was exact. No rounding happened."
 
+       trailerSpecial :: Double -> Int -> IO ()
+       trailerSpecial v stored = do putStrLn $ "   Rounding mode: " ++ show rm
+                                    if isNaN v
+                                       then exact
+                                       else do putStrLn $ "            Note: Original value of " ++ show v ++ " is out of range, saturated to " ++ show (e8m0Value stored) ++ "."
+                                               putStrLn   "                  The representable range is [2^-127, 2^127]."
+        where exact = putStrLn $ "            Note: Conversion from " ++ show inp ++ " was exact. No rounding happened."
+
 -- | Encoding UE5M3. Every representable value is exact as a Double and the encodings run in
 -- increasing order, so we round by hand against the table rather than going through LibBF.
 -- We have to: the top seven encodings sit exactly where IEEE puts infinity and NaN, so no
@@ -547,51 +672,53 @@
 -- the significand by one, across binade boundaries included -- and is what 'encodeFP4' and
 -- 'encodeE8M0' already do.
 encodeUE5M3 :: Bool -> RM -> String -> IO ()
-encodeUE5M3 debug rm inp = case reads (fixup True inp) of
-                             [(v :: Double, "")] -> analyze v
-                             _                   -> -- maybe it's a hexfloat? As in encodeFP4, the catch must
-                                                    -- scope over the parse only: analyze can legitimately die,
-                                                    -- and die throws an exit-exception of its own.
-                                                    do let hr = readHexRational inp
-                                                       ok <- (rnf hr `seq` pure True)
-                                                               `C.catch` (\(_ :: C.SomeException) -> pure False)
-                                                       if ok then analyze (fromRational hr)
-                                                             else unrecognized inp
- where largest :: Double
-       largest = last ue5m3Mags   -- 114688, the deviant encoding 0xFE
+encodeUE5M3 debug rm inp = do
+   parsed <- readNumberInput inp
+   case parsed of
+     InputNaN          -> outSpecial (0/0) nanBits
+     InputPosInf       -> outSpecial (1/0) nanBits
+     InputNegInf       -> negative
+     InputFinite v neg -> analyze v neg
+ where mags :: [Rational]
+       mags = map toRational ue5m3Mags
 
+       largest :: Rational
+       largest = last mags   -- 114688, the deviant encoding 0xFE
+
        -- The one and only NaN: all ones. Being unsigned, UE5M3 has a single such pattern
        -- where E4M3, which it otherwise follows, has one for each sign.
        nanBits :: Int
        nanBits = 0xFF
 
-       analyze :: Double -> IO ()
-       analyze v
-         -- NaN is representable, and uniquely so.
-         | isNaN v
-         = out nanBits
+       negative = die [ "UE5M3 has no representation for negative values."
+                      , "The representable range is [0, 114688], plus NaN."
+                      ]
+
+       outSpecial v stored = do putStr $ unlines $ ue5m3Layout debug "ENCODED" stored
+                                trailerSpecial v
+
+       analyze :: Rational -> Bool -> IO ()
+       analyze v isNegZero
          -- A negative is not an out-of-range magnitude: with no sign bit there is no direction
          -- to saturate towards, and clamping would quietly make it positive. A negative zero is
          -- still negative -- the same call 'encodeE8M0' makes.
-         | v < 0 || isNegativeZero v
-         = die [ "UE5M3 has no representation for negative values."
-               , "The representable range is [0, 114688], plus NaN."
-               ]
+         | v < 0 || isNegZero
+         = negative
          -- Having no infinity to saturate to, E4M3 turns whatever it cannot represent into NaN
-         -- rather than clamping; UE5M3 inherits that, and infinity is the limiting case of it.
-         | isInfinite v || v > largest
+         -- rather than clamping; explicit infinity is handled above.
+         | v > largest
          = out nanBits
          | True
          = out (roundMag v)
         where out stored = do putStr $ unlines $ ue5m3Layout debug "ENCODED" stored
-                              trailer v stored
+                              trailerFinite v stored
 
        -- Round to the index of one of the representable magnitudes, honoring the rounding mode.
        -- Every value reaching here is non-negative, so RTZ and RTN necessarily agree, as do RTP
        -- and rounding away from zero.
-       roundMag :: Double -> Int
+       roundMag :: Rational -> Int
        roundMag m
-         | e : _ <- [i | (i, mv) <- zip [0..] ue5m3Mags, mv == m]   -- Exactly representable
+         | e : _ <- [i | (i, mv) <- zip [0..] mags, mv == m]   -- Exactly representable
          = e
          | True
          = case rm of
@@ -600,30 +727,36 @@
              RTP -> hi
              RNE -> nearest (if even lo then lo else hi)
              RNA -> nearest hi
-        where lo = last [i | (i, mv) <- zip [0..] ue5m3Mags, mv < m]
+        where lo = last [i | (i, mv) <- zip [0..] mags, mv < m]
               hi = lo + 1
 
               -- Ties are broken by the given choice; note that comparing against the sum avoids
               -- any rounding of its own, since all the values involved are exact.
-              nearest tie = case compare (2 * m) (ue5m3Mags !! lo + ue5m3Mags !! hi) of
+              nearest tie = case compare (2 * m) (mags !! lo + mags !! hi) of
                               LT -> lo
                               GT -> hi
                               EQ -> tie
 
-       trailer :: Double -> Int -> IO ()
-       trailer v stored = do putStrLn $ "   Rounding mode: " ++ show rm
-                             note
+       trailerFinite :: Rational -> Int -> IO ()
+       trailerFinite v stored = do putStrLn $ "   Rounding mode: " ++ show rm
+                                   note
          where t = ue5m3Value stored
 
                note
-                 | isNaN v
-                 = exact
-                 | isInfinite v || v > largest
-                 = do putStrLn $ "            Note: The input value " ++ show v ++ " is out of bounds, and hence becomes NaN."
+                 | v > largest
+                 = do putStrLn $ "            Note: The input value " ++ show (fromRational v :: Double) ++ " is out of bounds, and hence becomes NaN."
                       putStrLn   "                  The representable range is [0, 114688]."
-                 | v == t
+                 | v == toRational t
                  = exact
                  | True
-                 = putStrLn $ "            Note: Original value of " ++ show v ++ " was rounded to " ++ show t ++ "."
+                 = putStrLn $ "            Note: Original value of " ++ show (fromRational v :: Double) ++ " was rounded to " ++ show t ++ "."
 
                exact = putStrLn $ "            Note: Conversion from " ++ show inp ++ " was exact. No rounding happened."
+
+       trailerSpecial :: Double -> IO ()
+       trailerSpecial v = do putStrLn $ "   Rounding mode: " ++ show rm
+                             if isNaN v
+                                then exact
+                                else do putStrLn $ "            Note: The input value " ++ show v ++ " is out of bounds, and hence becomes NaN."
+                                        putStrLn   "                  The representable range is [0, 114688]."
+        where exact = putStrLn $ "            Note: Conversion from " ++ show inp ++ " was exact. No rounding happened."
diff --git a/src/CrackNum/TestSuite.hs b/src/CrackNum/TestSuite.hs
--- a/src/CrackNum/TestSuite.hs
+++ b/src/CrackNum/TestSuite.hs
@@ -13,22 +13,25 @@
 
 {-# OPTIONS_GHC -Wall -Werror #-}
 
-module CrackNum.TestSuite(runTests) where
+module CrackNum.TestSuite(runTests, runTestsWith) where
 
 import Control.Exception as C
 
 import Test.Tasty
 import Test.Tasty.Golden (goldenVsFileDiff)
+import Test.Tasty.HUnit (assertBool, assertEqual, testCase)
 import System.FilePath
 
 import System.Directory (removeFile)
+import System.Environment (getExecutablePath)
+import System.Exit (ExitCode(ExitSuccess))
 import System.IO (IOMode(WriteMode), hPutStr, hSetNewlineMode, noNewlineTranslation, withFile)
 import System.Process (readProcessWithExitCode)
 
-import Data.List (intercalate)
+import Data.List (intercalate, isInfixOf)
 
-gold :: TestName -> String -> TestTree
-gold n as = goldenVsFileDiff n diff gf gfTmp (rm gfTmp >> run)
+golden :: FilePath -> TestName -> String -> TestTree
+golden executable n as = goldenVsFileDiff n diff gf gfTmp (rm gfTmp >> run)
   where gf    = "Golds" </> n <.> "gold"
         gfTmp = gf ++ "_temp"
 
@@ -41,7 +44,7 @@
         -- Windows, and --accept there would rewrite every gold in the process.
         write f s = withFile f WriteMode $ \h -> hSetNewlineMode h noNewlineTranslation >> hPutStr h s
 
-        run = do (ec, so, se) <- readProcessWithExitCode "crackNum" args ""
+        run = do (ec, so, se) <- readProcessWithExitCode executable args ""
                  write gfTmp $ intercalate "\n" $ [ "Arguments: " ++ as
                                                   , "Exit code: " ++ show ec
                                                   , so
@@ -52,10 +55,25 @@
 
 -- | run the test suite
 runTests :: IO ()
-runTests = defaultMain tests
+runTests = getExecutablePath >>= runTestsWith
 
-tests :: TestTree
-tests = testGroup "CrackNum" [
+-- | Run against an explicitly selected executable. The Cabal test component
+-- receives the just-built crackNum as a build tool and passes that path here;
+-- the executable's --runTests mode uses getExecutablePath above. Neither path
+-- can silently pick up a stale installation from PATH.
+runTestsWith :: FilePath -> IO ()
+runTestsWith executable = defaultMain (tests executable)
+
+encodingHas :: FilePath -> TestName -> [String] -> String -> TestTree
+encodingHas executable name args expected = testCase name $ do
+   (ec, so, se) <- readProcessWithExitCode executable args ""
+   assertEqual ("stderr:\n" ++ se) ExitSuccess ec
+   assertBool ("Expected output to contain " ++ show expected ++ ", got:\n" ++ so)
+              (expected `isInfixOf` so)
+
+tests :: FilePath -> TestTree
+tests executable = let gold = golden executable
+                   in testGroup "CrackNum" [
             testGroup "Encode" [
                gold "encode0"  "-i4 -- -2"
              , gold "encode1"  "-w4 2"
@@ -210,6 +228,38 @@
                          , ("dev0",  "63488")     -- Straddles the last IEEE-shaped value
                          , ("dev1",  "69632")
                          ]
+            ]
+          , testGroup "RoundingRegressions" [
+               encodingHas executable "SP RNE rounds upward"
+                           ["-fsp", "-rRNE", "1.00000006"] "Hex layout: 3F80 0001"
+             , encodingHas executable "SP RTZ rounds downward"
+                           ["-fsp", "-rRTZ", "1.00000006"] "Hex layout: 3F80 0000"
+             , encodingHas executable "DP RNE rounds upward"
+                           ["-fdp", "-rRNE", "1.0000000000000002"] "Hex layout: 3FF0 0000 0000 0001"
+             , encodingHas executable "DP RTZ rounds downward"
+                           ["-fdp", "-rRTZ", "1.0000000000000002"] "Hex layout: 3FF0 0000 0000 0000"
+             , encodingHas executable "E4M3 RTZ rounds positive downward"
+                           ["-fe4m3", "-rRTZ", "1.1"] "Hex layout: 38"
+             , encodingHas executable "E4M3 RTN rounds negative downward"
+                           ["-fe4m3", "-rRTN", "--", "-1.1"] "Hex layout: B9"
+             , encodingHas executable "E4M3 RTP uses upper extra value"
+                           ["-fe4m3", "-rRTP", "241"] "Hex layout: 78"
+             , encodingHas executable "E4M3 RTZ uses lower extra value"
+                           ["-fe4m3", "-rRTZ", "255"] "Hex layout: 77"
+             , encodingHas executable "E4M3 preserves digits above a midpoint"
+                           ["-fe4m3", "-rRNE", "1.06250000000000000001"] "Hex layout: 39"
+             , encodingHas executable "E4M3 preserves digits below a midpoint"
+                           ["-fe4m3", "-rRNE", "1.06249999999999999999"] "Hex layout: 38"
+             , encodingHas executable "FP4 preserves digits above a midpoint"
+                           ["-ffp4", "-rRNE", "1.25000000000000000001"] "Hex layout: 3"
+             , encodingHas executable "FP4E0M3 preserves digits above a midpoint"
+                           ["-ffp4e0m3", "-rRNE", "2.50000000000000000001"] "Hex layout: 3"
+             , encodingHas executable "E8M0 preserves digits below a midpoint"
+                           ["-fe8m0", "-rRNE", "1.49999999999999999999"] "Hex layout: 7F"
+             , encodingHas executable "UE5M3 preserves digits above a midpoint"
+                           ["-fue5m3", "-rRNE", "1.06250000000000000001"] "Hex layout: 79"
+             , encodingHas executable "SP accepts uppercase hexadecimal prefix"
+                           ["-fsp", "0X10"] "Hex layout: 4180 0000"
             ]
           , testGroup "Decode" [
               gold "decode0" "-i4       0b0110"
diff --git a/src/CrackNum/Utils.hs b/src/CrackNum/Utils.hs
--- a/src/CrackNum/Utils.hs
+++ b/src/CrackNum/Utils.hs
@@ -86,7 +86,7 @@
                     linp | linp == "nan"                     -> "NaN"
                     _                                        -> inp
 
-unrecognized :: String -> IO ()
+unrecognized :: String -> IO a
 unrecognized inp = die [ "Input does not represent floating point number we recognize."
                        , "Saw: " ++ inp
                        , ""
diff --git a/test/TestMain.hs b/test/TestMain.hs
new file mode 100644
--- /dev/null
+++ b/test/TestMain.hs
@@ -0,0 +1,15 @@
+{-# OPTIONS_GHC -Wall -Werror #-}
+
+module Main(main) where
+
+import System.Directory (findExecutable)
+import System.Exit (die)
+
+import CrackNum.TestSuite (runTestsWith)
+
+main :: IO ()
+main = do
+   mbExecutable <- findExecutable "crackNum"
+   case mbExecutable of
+     Just executable -> runTestsWith executable
+     Nothing         -> die "Cabal did not provide the crackNum test build-tool on PATH."
