Average Error: 5.2 → 3.1
Time: 1.5m
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(\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 = -\infty:\\ \;\;\;\;(\left(\left(18.0 \cdot y\right) \cdot \left(t \cdot z\right)\right) \cdot x + \left(b \cdot c\right))_* - (t \cdot \left(a \cdot 4.0\right) + \left((\left(x \cdot i\right) \cdot 4.0 + \left(27.0 \cdot \left(k \cdot j\right)\right))_*\right))_*\\ \mathbf{else}:\\ \;\;\;\;(\left(\left(\left(y \cdot x\right) \cdot z\right) \cdot 18.0 - 4.0 \cdot a\right) \cdot t + \left(b \cdot c - (i \cdot \left(x \cdot 4.0\right) + \left(\left(27.0 \cdot k\right) \cdot j\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. Initial program 60.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. Taylor expanded around inf 13.3

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

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

    if (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k))

    1. Initial program 3.0

      \[\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 simplify3.1

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

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

Runtime

Time bar (total: 1.5m)Debug logProfile

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