Average Error: 5.5 → 1.1
Time: 3.4m
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(\left(t \cdot \left(z \cdot \left(\left(18.0 \cdot x\right) \cdot y\right)\right) - t \cdot \left(4.0 \cdot a\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4.0\right)\right) - k \cdot \left(27.0 \cdot j\right) \le -1.7784275247826893 \cdot 10^{+308}:\\ \;\;\;\;\left((x \cdot \left(i \cdot 4.0\right) + \left(j \cdot \left(27.0 \cdot k\right)\right))_* + \left(\left(-x\right) \cdot \left(i \cdot 4.0\right) - j \cdot \left(27.0 \cdot k\right)\right)\right) + \left(\left(-(x \cdot \left(i \cdot 4.0\right) + \left(k \cdot \left(27.0 \cdot j\right)\right))_*\right) + \left(\left(\left(18.0 \cdot x\right) \cdot \left(y \cdot \left(z \cdot t\right)\right) - (t \cdot \left(4.0 \cdot a\right) + \left(b \cdot \left(-c\right)\right))_*\right) - (\left(-c\right) \cdot b + \left(b \cdot c\right))_*\right)\right)\\ \mathbf{elif}\;\left(\left(\left(t \cdot \left(z \cdot \left(\left(18.0 \cdot x\right) \cdot y\right)\right) - t \cdot \left(4.0 \cdot a\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4.0\right)\right) - k \cdot \left(27.0 \cdot j\right) \le 6.174010682206471 \cdot 10^{+290}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(z \cdot \left(\left(18.0 \cdot x\right) \cdot y\right)\right) - t \cdot \left(4.0 \cdot a\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4.0\right)\right) - k \cdot \left(27.0 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left((x \cdot \left(i \cdot 4.0\right) + \left(j \cdot \left(27.0 \cdot k\right)\right))_* + \left(\left(-x\right) \cdot \left(i \cdot 4.0\right) - j \cdot \left(27.0 \cdot k\right)\right)\right) + \left(\left(-(x \cdot \left(i \cdot 4.0\right) + \left(k \cdot \left(27.0 \cdot j\right)\right))_*\right) + \left(\left(\left(18.0 \cdot x\right) \cdot \left(y \cdot \left(z \cdot t\right)\right) - (t \cdot \left(4.0 \cdot a\right) + \left(b \cdot \left(-c\right)\right))_*\right) - (\left(-c\right) \cdot b + \left(b \cdot c\right))_*\right)\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 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)) < -1.7784275247826893e+308 or 6.174010682206471e+290 < (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k))

    1. Initial program 44.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. Initial simplification26.5

      \[\leadsto \left(\left(\left(18.0 \cdot x\right) \cdot y\right) \cdot \left(z \cdot t\right) - \left(t \cdot \left(4.0 \cdot a\right) - b \cdot c\right)\right) - \left(x \cdot \left(4.0 \cdot i\right) + j \cdot \left(27.0 \cdot k\right)\right)\]
    3. Using strategy rm
    4. Applied prod-diff26.5

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

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

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

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

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

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

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

    if -1.7784275247826893e+308 < (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)) < 6.174010682206471e+290

    1. Initial program 0.3

      \[\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\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.1

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

Runtime

Time bar (total: 3.4m)Debug logProfile

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