Average Error: 5.4 → 1.1
Time: 3.4m
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}\;\left(\left(b \cdot c - i \cdot \left(x \cdot 4.0\right)\right) - j \cdot \left(27.0 \cdot k\right)\right) + t \cdot \left(\left(\left(z \cdot x\right) \cdot y\right) \cdot 18.0 - 4.0 \cdot a\right) \le -9.821595242580316 \cdot 10^{+294}:\\ \;\;\;\;\left(b \cdot c - \left(j \cdot \left(27.0 \cdot k\right) + a \cdot \left(4.0 \cdot t\right)\right)\right) - x \cdot \left(4.0 \cdot i - \left(t \cdot z\right) \cdot \left(18.0 \cdot y\right)\right)\\ \mathbf{if}\;\left(\left(b \cdot c - i \cdot \left(x \cdot 4.0\right)\right) - j \cdot \left(27.0 \cdot k\right)\right) + t \cdot \left(\left(\left(z \cdot x\right) \cdot y\right) \cdot 18.0 - 4.0 \cdot a\right) \le 3.6940623183977284 \cdot 10^{+299}:\\ \;\;\;\;\left(\left(b \cdot c - i \cdot \left(x \cdot 4.0\right)\right) - j \cdot \left(27.0 \cdot k\right)\right) + t \cdot \left(\left(\left(z \cdot x\right) \cdot y\right) \cdot 18.0 - 4.0 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - \left(j \cdot \left(27.0 \cdot k\right) + a \cdot \left(4.0 \cdot t\right)\right)\right) - x \cdot \left(4.0 \cdot i - \left(t \cdot z\right) \cdot \left(18.0 \cdot y\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 (+ (- (- (* b c) (* i (* x 4.0))) (* j (* 27.0 k))) (* t (- (* (* (* z x) y) 18.0) (* 4.0 a)))) < -9.821595242580316e+294 or 3.6940623183977284e+299 < (+ (- (- (* b c) (* i (* x 4.0))) (* j (* 27.0 k))) (* t (- (* (* (* z x) y) 18.0) (* 4.0 a))))

    1. Initial program 27.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. Applied simplify40.9

      \[\leadsto \color{blue}{\left(\left(b \cdot c - i \cdot \left(x \cdot 4.0\right)\right) - j \cdot \left(27.0 \cdot k\right)\right) + t \cdot \left(\left(z \cdot x\right) \cdot \left(y \cdot 18.0\right) - 4.0 \cdot a\right)}\]
    3. Using strategy rm
    4. Applied sub-neg40.9

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

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

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

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

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

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

    if -9.821595242580316e+294 < (+ (- (- (* b c) (* i (* x 4.0))) (* j (* 27.0 k))) (* t (- (* (* (* z x) y) 18.0) (* 4.0 a)))) < 3.6940623183977284e+299

    1. Initial program 2.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\]
    2. Applied simplify0.2

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

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

Runtime

Time bar (total: 3.4m)Debug logProfile

herbie shell --seed '#(1070864556 424010669 783715395 1203517814 4070606583 4107618214)' 
(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)))