Average Error: 5.2 → 5.6
Time: 3.1m
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(c \cdot b - \left(j \cdot k\right) \cdot 27.0\right) - \left(a \cdot t + x \cdot i\right) \cdot 4.0 \le 9253.773918455447:\\ \;\;\;\;\left(\left(\left(\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\\ \mathbf{if}\;\left(c \cdot b - \left(j \cdot k\right) \cdot 27.0\right) - \left(a \cdot t + x \cdot i\right) \cdot 4.0 \le 1.3515878555453528 \cdot 10^{+137}:\\ \;\;\;\;\left(b \cdot c + \left(\left(z \cdot x\right) \cdot 18.0\right) \cdot \left(y \cdot t\right)\right) - \left(j \cdot \left(27.0 \cdot k\right) + \left(x \cdot i + a \cdot t\right) \cdot 4.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b - \left(j \cdot k\right) \cdot 27.0\right) - \left(a \cdot t + x \cdot i\right) \cdot 4.0\\ \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 3 regimes
  2. if (- (- (* c b) (* (* j k) 27.0)) (* (+ (* a t) (* x i)) 4.0)) < 9253.773918455447

    1. Initial program 5.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. Using strategy rm
    3. Applied associate-*l*5.7

      \[\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 9253.773918455447 < (- (- (* c b) (* (* j k) 27.0)) (* (+ (* a t) (* x i)) 4.0)) < 1.3515878555453528e+137

    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. Applied simplify4.6

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

    if 1.3515878555453528e+137 < (- (- (* c b) (* (* j k) 27.0)) (* (+ (* a t) (* x i)) 4.0))

    1. Initial program 5.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. Taylor expanded around 0 6.1

      \[\leadsto \left(\left(\left(\color{blue}{0} - \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. Applied simplify6.0

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

Runtime

Time bar (total: 3.1m)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' 
(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)))