Average Error: 5.7 → 2.1
Time: 2.1m
Precision: 64
Internal Precision: 576
\[\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(y \cdot t\right) \cdot \left(18.0 \cdot \left(z \cdot x\right)\right) + \left(c \cdot b\right))_* - 4.0 \cdot \left(i \cdot x + t \cdot a\right)\right) - \sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \left(\sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \sqrt[3]{\left(27.0 \cdot j\right) \cdot k}\right) \le -1.6592942571381438 \cdot 10^{+308}:\\ \;\;\;\;(t \cdot \left(\left(18.0 \cdot x\right) \cdot \left(z \cdot y\right)\right) + \left((\left(a \cdot 4.0\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_* - (j \cdot \left(k \cdot 27.0\right) + \left(i \cdot \left(4.0 \cdot x\right)\right))_*\\ \mathbf{if}\;\left((\left(y \cdot t\right) \cdot \left(18.0 \cdot \left(z \cdot x\right)\right) + \left(c \cdot b\right))_* - 4.0 \cdot \left(i \cdot x + t \cdot a\right)\right) - \sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \left(\sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \sqrt[3]{\left(27.0 \cdot j\right) \cdot k}\right) \le 7.62134266190491 \cdot 10^{+299}:\\ \;\;\;\;\left((\left(y \cdot t\right) \cdot \left(18.0 \cdot \left(z \cdot x\right)\right) + \left(c \cdot b\right))_* - 4.0 \cdot \left(i \cdot x + t \cdot a\right)\right) - \sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \left(\sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \sqrt[3]{\left(27.0 \cdot j\right) \cdot k}\right)\\ \mathbf{else}:\\ \;\;\;\;(\left(-t\right) \cdot \left(a \cdot 4.0\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left(i \cdot x\right) + \left(\left(k \cdot j\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 3 regimes
  2. if (- (+ (- (fma (* y t) (* 18.0 (* z x)) (* b c)) (* 4.0 (+ (* t a) (* i x)))) 0) (* (* (cbrt (* (* j 27.0) k)) (cbrt (* (* j 27.0) k))) (cbrt (* (* j 27.0) k)))) < -1.6592942571381438e+308

    1. Initial program 16.9

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

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

    if -1.6592942571381438e+308 < (- (+ (- (fma (* y t) (* 18.0 (* z x)) (* b c)) (* 4.0 (+ (* t a) (* i x)))) 0) (* (* (cbrt (* (* j 27.0) k)) (cbrt (* (* j 27.0) k))) (cbrt (* (* j 27.0) k)))) < 7.62134266190491e+299

    1. Initial program 4.9

      \[\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. Using strategy rm
    3. Applied *-un-lft-identity4.9

      \[\leadsto \left(\color{blue}{1 \cdot \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\]
    4. Applied prod-diff4.9

      \[\leadsto \color{blue}{\left((1 \cdot \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(-i \cdot \left(x \cdot 4.0\right)\right))_* + (\left(-i\right) \cdot \left(x \cdot 4.0\right) + \left(i \cdot \left(x \cdot 4.0\right)\right))_*\right)} - \left(j \cdot 27.0\right) \cdot k\]
    5. Applied simplify0.2

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

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

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

    if 7.62134266190491e+299 < (- (+ (- (fma (* y t) (* 18.0 (* z x)) (* b c)) (* 4.0 (+ (* t a) (* i x)))) 0) (* (* (cbrt (* (* j 27.0) k)) (cbrt (* (* j 27.0) k))) (cbrt (* (* j 27.0) k))))

    1. Initial program 10.9

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

      \[\leadsto \left(\left(\left(\color{blue}{0} - \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\]
    3. Applied simplify17.4

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;\left((\left(y \cdot t\right) \cdot \left(18.0 \cdot \left(z \cdot x\right)\right) + \left(c \cdot b\right))_* - 4.0 \cdot \left(i \cdot x + t \cdot a\right)\right) - \sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \left(\sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \sqrt[3]{\left(27.0 \cdot j\right) \cdot k}\right) \le -1.6592942571381438 \cdot 10^{+308}:\\ \;\;\;\;(t \cdot \left(\left(18.0 \cdot x\right) \cdot \left(z \cdot y\right)\right) + \left((\left(a \cdot 4.0\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_* - (j \cdot \left(k \cdot 27.0\right) + \left(i \cdot \left(4.0 \cdot x\right)\right))_*\\ \mathbf{if}\;\left((\left(y \cdot t\right) \cdot \left(18.0 \cdot \left(z \cdot x\right)\right) + \left(c \cdot b\right))_* - 4.0 \cdot \left(i \cdot x + t \cdot a\right)\right) - \sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \left(\sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \sqrt[3]{\left(27.0 \cdot j\right) \cdot k}\right) \le 7.62134266190491 \cdot 10^{+299}:\\ \;\;\;\;\left((\left(y \cdot t\right) \cdot \left(18.0 \cdot \left(z \cdot x\right)\right) + \left(c \cdot b\right))_* - 4.0 \cdot \left(i \cdot x + t \cdot a\right)\right) - \sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \left(\sqrt[3]{\left(27.0 \cdot j\right) \cdot k} \cdot \sqrt[3]{\left(27.0 \cdot j\right) \cdot k}\right)\\ \mathbf{else}:\\ \;\;\;\;(\left(-t\right) \cdot \left(a \cdot 4.0\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left(i \cdot x\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*\\ \end{array}}\]

Runtime

Time bar (total: 2.1m)Debug logProfile

herbie shell --seed 2019053 +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)))