Average Error: 5.5 → 3.8
Time: 1.2m
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}\;y \le -3.9360899473703956 \cdot 10^{+45}:\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + \left(j \cdot k\right) \cdot 27.0\right)\right) + \left(\left(x \cdot z\right) \cdot \left(y \cdot 18.0\right) - 4.0 \cdot a\right) \cdot t\\ \mathbf{elif}\;y \le 1.4425786038345991 \cdot 10^{+81}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(z \cdot \left(\left(x \cdot 18.0\right) \cdot y\right)\right) - \left(4.0 \cdot a\right) \cdot t\right) + c \cdot b\right) - i \cdot \left(x \cdot 4.0\right)\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + \left(27.0 \cdot k\right) \cdot j\right)\right) + t \cdot \left(y \cdot \left(\left(x \cdot 18.0\right) \cdot z\right) - 4.0 \cdot a\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 y < -3.9360899473703956e+45

    1. Initial program 12.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. Simplified7.8

      \[\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. Taylor expanded around 0 7.7

      \[\leadsto \left(c \cdot b - \left(\color{blue}{27.0 \cdot \left(j \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\]
    4. Using strategy rm
    5. Applied *-commutative7.7

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

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

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

    if -3.9360899473703956e+45 < y < 1.4425786038345991e+81

    1. Initial program 1.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\]

    if 1.4425786038345991e+81 < y

    1. Initial program 13.1

      \[\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. Simplified7.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. Taylor expanded around 0 7.3

      \[\leadsto \left(c \cdot b - \left(\color{blue}{27.0 \cdot \left(j \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\]
    4. Using strategy rm
    5. Applied *-commutative7.3

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \color{blue}{\left(k \cdot j\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\]
    6. Applied associate-*r*7.3

      \[\leadsto \left(c \cdot b - \left(\color{blue}{\left(27.0 \cdot k\right) \cdot j} + \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 simplification3.8

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

Reproduce

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