Average Error: 5.4 → 4.5
Time: 2.4m
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}\;t \le -1.4831210459346322 \cdot 10^{-112}:\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + k \cdot \left(j \cdot 27.0\right)\right)\right) + t \cdot \left(\left(x \cdot y\right) \cdot \left(18.0 \cdot z\right) - a \cdot 4.0\right)\\ \mathbf{elif}\;t \le 2.376206315586562 \cdot 10^{-145}:\\ \;\;\;\;\left(a \cdot \left(-4.0\right)\right) \cdot t + \left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + k \cdot \left(j \cdot 27.0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + j \cdot \left(k \cdot 27.0\right)\right)\right) + t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot z\right) \cdot y - a \cdot 4.0\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 t < -1.4831210459346322e-112

    1. Initial program 3.3

      \[\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. Simplified2.9

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

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

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

    if -1.4831210459346322e-112 < t < 2.376206315586562e-145

    1. Initial program 8.8

      \[\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. Simplified8.9

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

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

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

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

    if 2.376206315586562e-145 < t

    1. Initial program 3.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. Simplified3.3

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.4831210459346322 \cdot 10^{-112}:\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + k \cdot \left(j \cdot 27.0\right)\right)\right) + t \cdot \left(\left(x \cdot y\right) \cdot \left(18.0 \cdot z\right) - a \cdot 4.0\right)\\ \mathbf{elif}\;t \le 2.376206315586562 \cdot 10^{-145}:\\ \;\;\;\;\left(a \cdot \left(-4.0\right)\right) \cdot t + \left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + k \cdot \left(j \cdot 27.0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + j \cdot \left(k \cdot 27.0\right)\right)\right) + t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot z\right) \cdot y - a \cdot 4.0\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019072 
(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)))