Average Error: 5.7 → 1.0
Time: 3.1m
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}\;(x \cdot \left(\left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right) + \left((\left(4.0 \cdot t\right) \cdot \left(-a\right) + \left(b \cdot c\right))_*\right))_* - (\left(k \cdot j\right) \cdot 27.0 + \left(4.0 \cdot \left(x \cdot i\right)\right))_* \le -3.0991455533093886 \cdot 10^{+290}:\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot \left(\left(\left(18.0 \cdot x\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right)\right) - i \cdot \left(x \cdot 4.0\right)\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{if}\;(x \cdot \left(\left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right) + \left((\left(4.0 \cdot t\right) \cdot \left(-a\right) + \left(b \cdot c\right))_*\right))_* - (\left(k \cdot j\right) \cdot 27.0 + \left(4.0 \cdot \left(x \cdot i\right)\right))_* \le 1.8578290383133377 \cdot 10^{+307}:\\ \;\;\;\;(x \cdot \left(\left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right) + \left((\left(4.0 \cdot t\right) \cdot \left(-a\right) + \left(b \cdot c\right))_*\right))_* - (\left(k \cdot j\right) \cdot 27.0 + \left(4.0 \cdot \left(x \cdot i\right)\right))_*\\ \mathbf{else}:\\ \;\;\;\;(\left(\left(x \cdot t\right) \cdot \left(18.0 \cdot y\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(k \cdot 27.0\right) \cdot j\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 x (* (* z t) (* y 18.0)) (fma (* t 4.0) (- a) (* c b))) (fma (* k j) 27.0 (* 4.0 (* i x)))) 0) < -3.0991455533093886e+290

    1. Initial program 7.6

      \[\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 -3.0991455533093886e+290 < (+ (- (fma x (* (* z t) (* y 18.0)) (fma (* t 4.0) (- a) (* c b))) (fma (* k j) 27.0 (* 4.0 (* i x)))) 0) < 1.8578290383133377e+307

    1. Initial program 5.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. Applied simplify4.2

      \[\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 *-un-lft-identity4.2

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

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

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

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

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

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

    1. Initial program 6.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 simplify5.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. Recombined 3 regimes into one program.
  4. Applied simplify1.0

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;(x \cdot \left(\left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right) + \left((\left(4.0 \cdot t\right) \cdot \left(-a\right) + \left(b \cdot c\right))_*\right))_* - (\left(k \cdot j\right) \cdot 27.0 + \left(4.0 \cdot \left(x \cdot i\right)\right))_* \le -3.0991455533093886 \cdot 10^{+290}:\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot \left(\left(\left(18.0 \cdot x\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right)\right) - i \cdot \left(x \cdot 4.0\right)\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{if}\;(x \cdot \left(\left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right) + \left((\left(4.0 \cdot t\right) \cdot \left(-a\right) + \left(b \cdot c\right))_*\right))_* - (\left(k \cdot j\right) \cdot 27.0 + \left(4.0 \cdot \left(x \cdot i\right)\right))_* \le 1.8578290383133377 \cdot 10^{+307}:\\ \;\;\;\;(x \cdot \left(\left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right) + \left((\left(4.0 \cdot t\right) \cdot \left(-a\right) + \left(b \cdot c\right))_*\right))_* - (\left(k \cdot j\right) \cdot 27.0 + \left(4.0 \cdot \left(x \cdot i\right)\right))_*\\ \mathbf{else}:\\ \;\;\;\;(\left(\left(x \cdot t\right) \cdot \left(18.0 \cdot y\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(k \cdot 27.0\right) \cdot j\right))_*\\ \end{array}}\]

Runtime

Time bar (total: 3.1m)Debug logProfile

herbie shell --seed '#(1070833653 108281690 3330367898 3632331308 3494323072 43156186)' +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)))