Average Error: 5.5 → 1.2
Time: 2.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(\sqrt[3]{(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*} \cdot \sqrt[3]{(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*}\right) \cdot \sqrt[3]{(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*} = -\infty:\\ \;\;\;\;\left(\left(\left(\left(x \cdot 18.0\right) \cdot \left(y \cdot \left(z \cdot t\right)\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(\sqrt[3]{(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*} \cdot \sqrt[3]{(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*}\right) \cdot \sqrt[3]{(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*} \le 8.502834544076054 \cdot 10^{+274}:\\ \;\;\;\;(\left(z \cdot 18.0\right) \cdot \left(t \cdot \left(y \cdot x\right)\right) + \left(c \cdot b\right))_* - (4.0 \cdot \left((a \cdot t + \left(x \cdot i\right))_*\right) + \left(\left(k \cdot j\right) \cdot 27.0\right))_*\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(x \cdot 18.0\right) \cdot \left(y \cdot \left(z \cdot t\right)\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\\ \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 (* (* (cbrt (- (fma (* z 18.0) (* t (* y x)) (* c b)) (fma 4.0 (fma a t (* x i)) (* (* k j) 27.0)))) (cbrt (- (fma (* z 18.0) (* t (* y x)) (* c b)) (fma 4.0 (fma a t (* x i)) (* (* k j) 27.0))))) (cbrt (- (fma (* z 18.0) (* t (* y x)) (* c b)) (fma 4.0 (fma a t (* x i)) (* (* k j) 27.0))))) or 8.502834544076054e+274 < (* (* (cbrt (- (fma (* z 18.0) (* t (* y x)) (* c b)) (fma 4.0 (fma a t (* x i)) (* (* k j) 27.0)))) (cbrt (- (fma (* z 18.0) (* t (* y x)) (* c b)) (fma 4.0 (fma a t (* x i)) (* (* k j) 27.0))))) (cbrt (- (fma (* z 18.0) (* t (* y x)) (* c b)) (fma 4.0 (fma a t (* x i)) (* (* k j) 27.0)))))

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

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

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

    1. Initial program 2.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. Taylor expanded around inf 2.1

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

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

Runtime

Time bar (total: 2.4m)Debug logProfile

herbie shell --seed '#(1064300848 3212030778 2049303162 3567222883 2277747821 1384278011)' +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)))