Average Error: 5.3 → 2.1
Time: 1.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(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k \le -6.521498081460163 \cdot 10^{+302}:\\ \;\;\;\;\left(c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(k \cdot j\right) \cdot 27.0\right)\right) + \left(-t\right) \cdot \left(a \cdot 4.0\right)\\ \mathbf{elif}\;\left(\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k \le 3.032632112836556 \cdot 10^{+304}:\\ \;\;\;\;\left(\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0\right) + \left(c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(k \cdot j\right) \cdot 27.0\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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (- (- (+ (- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)) < -6.521498081460163e+302

    1. Initial program 24.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. Initial simplification11.8

      \[\leadsto \left(\left(x \cdot 18.0\right) \cdot \left(y \cdot z\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right)\]
    3. Taylor expanded around 0 29.9

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

    if -6.521498081460163e+302 < (- (- (+ (- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)) < 3.032632112836556e+304

    1. Initial program 2.4

      \[\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 associate-*l*0.2

      \[\leadsto \left(\left(\left(\color{blue}{\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot \left(z \cdot t\right)} - \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.032632112836556e+304 < (- (- (+ (- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k))

    1. Initial program 31.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 simplification10.6

      \[\leadsto \left(\left(x \cdot 18.0\right) \cdot \left(y \cdot z\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right)\]
  3. Recombined 3 regimes into one program.
  4. Final simplification2.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k \le -6.521498081460163 \cdot 10^{+302}:\\ \;\;\;\;\left(c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(k \cdot j\right) \cdot 27.0\right)\right) + \left(-t\right) \cdot \left(a \cdot 4.0\right)\\ \mathbf{elif}\;\left(\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k \le 3.032632112836556 \cdot 10^{+304}:\\ \;\;\;\;\left(\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(27.0 \cdot j\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0\right) + \left(c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(k \cdot j\right) \cdot 27.0\right)\right)\\ \end{array}\]

Runtime

Time bar (total: 1.1m)Debug logProfile

herbie shell --seed 2018216 
(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)))