Average Error: 5.4 → 1.2
Time: 3.7m
Precision: 64
Internal Precision: 384
\[\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(t \cdot \left(x \cdot \left(y \cdot 18.0\right)\right)\right) \cdot z + \left((\left(-a\right) \cdot \left(4.0 \cdot t\right) + \left(b \cdot c\right))_*\right))_* - (i \cdot \left(x \cdot 4.0\right) + \left(\left(27.0 \cdot k\right) \cdot j\right))_* \le -1.3647391333303078 \cdot 10^{+305}:\\ \;\;\;\;(\left(t \cdot x\right) \cdot \left(18.0 \cdot \left(y \cdot z\right)\right) + \left(c \cdot b\right))_* - (\left((t \cdot a + \left(x \cdot i\right))_*\right) \cdot 4.0 + \left(\left(j \cdot k\right) \cdot 27.0\right))_*\\ \mathbf{if}\;(\left(t \cdot \left(x \cdot \left(y \cdot 18.0\right)\right)\right) \cdot z + \left((\left(-a\right) \cdot \left(4.0 \cdot t\right) + \left(b \cdot c\right))_*\right))_* - (i \cdot \left(x \cdot 4.0\right) + \left(\left(27.0 \cdot k\right) \cdot j\right))_* \le 2.334595580367056 \cdot 10^{+296}:\\ \;\;\;\;(\left(t \cdot \left(x \cdot \left(y \cdot 18.0\right)\right)\right) \cdot z + \left((\left(-a\right) \cdot \left(4.0 \cdot t\right) + \left(b \cdot c\right))_*\right))_* - (i \cdot \left(x \cdot 4.0\right) + \left(\left(27.0 \cdot k\right) \cdot j\right))_*\\ \mathbf{else}:\\ \;\;\;\;(\left(t \cdot x\right) \cdot \left(18.0 \cdot \left(y \cdot z\right)\right) + \left(c \cdot b\right))_* - (\left((t \cdot a + \left(x \cdot i\right))_*\right) \cdot 4.0 + \left(\left(j \cdot k\right) \cdot 27.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 2 regimes
  2. if (- (fma (* t (* x (* y 18.0))) z (fma (- a) (* 4.0 t) (* b c))) (fma i (* x 4.0) (* (* 27.0 k) j))) < -1.3647391333303078e+305 or 2.334595580367056e+296 < (- (fma (* t (* x (* y 18.0))) z (fma (- a) (* 4.0 t) (* b c))) (fma i (* x 4.0) (* (* 27.0 k) j)))

    1. Initial program 30.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. Applied simplify26.3

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

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

      \[\leadsto \color{blue}{(\left(z \cdot 18.0\right) \cdot \left(\left(y \cdot t\right) \cdot x\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((t \cdot a + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt25.7

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

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

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

    if -1.3647391333303078e+305 < (- (fma (* t (* x (* y 18.0))) z (fma (- a) (* 4.0 t) (* b c))) (fma i (* x 4.0) (* (* 27.0 k) j))) < 2.334595580367056e+296

    1. Initial program 2.7

      \[\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. Applied simplify1.8

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

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

Runtime

Time bar (total: 3.7m)Debug logProfile

herbie shell --seed '#(1070609872 3456127585 2380521889 2328837196 1765472538 734540918)' +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)))