Average Error: 5.8 → 1.7
Time: 1.0m
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(\sqrt[3]{(\left(\left(x \cdot z\right) \cdot 18.0\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_*} \cdot \sqrt[3]{(\left(\left(x \cdot z\right) \cdot 18.0\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_*}\right) \cdot \sqrt[3]{(\left(\left(x \cdot z\right) \cdot 18.0\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_*} - (j \cdot \left(k \cdot 27.0\right) + \left(\left(4.0 \cdot x\right) \cdot i\right))_* \le -1.7957204520205351 \cdot 10^{+308}:\\ \;\;\;\;\left(\left(\left(\left(z \cdot \left(y \cdot \left(18.0 \cdot x\right)\right)\right) \cdot t - t \cdot \left(4.0 \cdot a\right)\right) + c \cdot b\right) - \left(4.0 \cdot x\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{elif}\;\left(\sqrt[3]{(\left(\left(x \cdot z\right) \cdot 18.0\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_*} \cdot \sqrt[3]{(\left(\left(x \cdot z\right) \cdot 18.0\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_*}\right) \cdot \sqrt[3]{(\left(\left(x \cdot z\right) \cdot 18.0\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_*} - (j \cdot \left(k \cdot 27.0\right) + \left(\left(4.0 \cdot x\right) \cdot i\right))_* \le 6.307654359755041 \cdot 10^{+303}:\\ \;\;\;\;(\left(x \cdot \left(18.0 \cdot z\right)\right) \cdot \left(t \cdot y\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(c \cdot b\right))_*\right))_* - (j \cdot \left(k \cdot 27.0\right) + \left(\left(4.0 \cdot x\right) \cdot i\right))_*\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(z \cdot \left(y \cdot \left(18.0 \cdot x\right)\right)\right) \cdot t - t \cdot \left(4.0 \cdot a\right)\right) + c \cdot b\right) - \left(4.0 \cdot x\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k\\ \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 (- (* (* (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c)))) (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c))))) (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c))))) (fma j (* k 27.0) (* (* x 4.0) i))) < -1.7957204520205351e+308 or 6.307654359755041e+303 < (- (* (* (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c)))) (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c))))) (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c))))) (fma j (* k 27.0) (* (* x 4.0) i)))

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

    if -1.7957204520205351e+308 < (- (* (* (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c)))) (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c))))) (cbrt (fma (* (* x z) 18.0) (* t y) (fma (* a 4.0) (- t) (* b c))))) (fma j (* k 27.0) (* (* x 4.0) i))) < 6.307654359755041e+303

    1. Initial program 4.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. Initial simplification5.2

      \[\leadsto (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))_*\]
    3. Using strategy rm
    4. Applied associate-*l*2.6

      \[\leadsto (t \cdot \color{blue}{\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\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))_*\]
    5. Taylor expanded around -inf 5.2

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

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

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

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

Runtime

Time bar (total: 1.0m)Debug logProfile

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