Average Error: 5.3 → 3.5
Time: 55.3s
Precision: 64
Internal Precision: 128
\[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
\[\begin{array}{l} \mathbf{if}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i = -\infty:\\ \;\;\;\;(\left(18.0 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (\left(j \cdot k\right) \cdot 27.0 + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\\ \mathbf{elif}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i \le 1.0806265301714302 \cdot 10^{+293}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;(\left(-a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Bits error versus j

Bits error versus k

Derivation

  1. Split input into 3 regimes
  2. if (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) < -inf.0

    1. Initial program 60.5

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified38.7

      \[\leadsto \color{blue}{(\left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*}\]
    3. Using strategy rm
    4. Applied associate-*r*38.7

      \[\leadsto (\left(\color{blue}{\left(\left(y \cdot z\right) \cdot x\right) \cdot 18.0} - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\]
    5. Taylor expanded around inf 38.5

      \[\leadsto (\left(\left(\left(y \cdot z\right) \cdot x\right) \cdot 18.0 - a \cdot 4.0\right) \cdot t + \left(c \cdot b - \color{blue}{\left(27.0 \cdot \left(j \cdot k\right) + 4.0 \cdot \left(i \cdot x\right)\right)}\right))_*\]
    6. Simplified38.7

      \[\leadsto (\left(\left(\left(y \cdot z\right) \cdot x\right) \cdot 18.0 - a \cdot 4.0\right) \cdot t + \left(c \cdot b - \color{blue}{(\left(k \cdot j\right) \cdot 27.0 + \left(\left(x \cdot 4.0\right) \cdot i\right))_*}\right))_*\]

    if -inf.0 < (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) < 1.0806265301714302e+293

    1. Initial program 0.4

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]

    if 1.0806265301714302e+293 < (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i))

    1. Initial program 40.2

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified26.5

      \[\leadsto \color{blue}{(\left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*}\]
    3. Using strategy rm
    4. Applied associate-*r*26.4

      \[\leadsto (\left(\color{blue}{\left(\left(y \cdot z\right) \cdot x\right) \cdot 18.0} - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\]
    5. Taylor expanded around 0 25.8

      \[\leadsto (\left(\color{blue}{0} - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\]
  3. Recombined 3 regimes into one program.
  4. Final simplification3.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i = -\infty:\\ \;\;\;\;(\left(18.0 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - (\left(j \cdot k\right) \cdot 27.0 + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\\ \mathbf{elif}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i \le 1.0806265301714302 \cdot 10^{+293}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;(\left(-a \cdot 4.0\right) \cdot t + \left(c \cdot b - (k \cdot \left(27.0 \cdot j\right) + \left(\left(x \cdot 4.0\right) \cdot i\right))_*\right))_*\\ \end{array}\]

Reproduce

herbie shell --seed 2019094 +o rules:numerics
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1"
  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))