Average Error: 5.8 → 3.5
Time: 1.6m
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}\;y \cdot z \le -3.652253322258037 \cdot 10^{+303} \lor \neg \left(y \cdot z \le 9.303442844769463 \cdot 10^{+247}\right):\\ \;\;\;\;\left(c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(27.0 \cdot k\right) \cdot j\right)\right) + t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z - a \cdot 4.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(18.0 \cdot \left(y \cdot z\right)\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - \left(\left(j \cdot k\right) \cdot 27.0 + \left(x \cdot 4.0\right) \cdot i\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 2 regimes
  2. if (* y z) < -3.652253322258037e+303 or 9.303442844769463e+247 < (* y z)

    1. Initial program 19.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\]
    2. Initial simplification49.2

      \[\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. Using strategy rm
    4. Applied associate-*r*49.2

      \[\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(\color{blue}{\left(27.0 \cdot k\right) \cdot j} + \left(x \cdot 4.0\right) \cdot i\right)\right)\]
    5. Using strategy rm
    6. Applied associate-*r*19.5

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

    if -3.652253322258037e+303 < (* y z) < 9.303442844769463e+247

    1. Initial program 4.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. Initial simplification2.0

      \[\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. Using strategy rm
    4. Applied associate-*l*2.0

      \[\leadsto \left(\color{blue}{x \cdot \left(18.0 \cdot \left(y \cdot z\right)\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 2 regimes into one program.
  4. Final simplification3.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -3.652253322258037 \cdot 10^{+303} \lor \neg \left(y \cdot z \le 9.303442844769463 \cdot 10^{+247}\right):\\ \;\;\;\;\left(c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(27.0 \cdot k\right) \cdot j\right)\right) + t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z - a \cdot 4.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(18.0 \cdot \left(y \cdot z\right)\right) - a \cdot 4.0\right) \cdot t + \left(c \cdot b - \left(\left(j \cdot k\right) \cdot 27.0 + \left(x \cdot 4.0\right) \cdot i\right)\right)\\ \end{array}\]

Runtime

Time bar (total: 1.6m)Debug logProfile

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