Average Error: 5.4 → 1.6
Time: 1.8m
Precision: 64
Internal precision: 128
\[\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 \le -28634956.806383856:\\ \;\;\;\;\left(b \cdot c - 4.0 \cdot \left(i \cdot x + a \cdot t\right)\right) + \left(y \cdot \left(18.0 \cdot \left(\left(x \cdot t\right) \cdot z\right)\right) - \left(27.0 \cdot j\right) \cdot k\right)\\ \mathbf{if}\;y \le 0.00028936941006074067:\\ \;\;\;\;\left(c \cdot b - 4.0 \cdot \left(t \cdot a + i \cdot x\right)\right) - \left(\left(j \cdot 27.0\right) \cdot k - \left(\left(t \cdot y\right) \cdot \left(18.0 \cdot x\right)\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4.0 \cdot \left(i \cdot x + a \cdot t\right)\right) + \left(y \cdot \left(18.0 \cdot \left(\left(x \cdot t\right) \cdot z\right)\right) - \left(27.0 \cdot j\right) \cdot k\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 y < -28634956.806383856 or 0.00028936941006074067 < y

    1. Initial program 10.8

      \[\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 simplify 2.6

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

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

    if -28634956.806383856 < y < 0.00028936941006074067

    1. Initial program 1.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 simplify 5.9

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

      \[\leadsto \left(b \cdot c - 4.0 \cdot \left(i \cdot x + a \cdot t\right)\right) + \left(\left(y \cdot 18.0\right) \cdot \color{blue}{\left(x \cdot \left(t \cdot z\right)\right)} - \left(27.0 \cdot j\right) \cdot k\right)\]
    5. Using strategy rm
    6. Applied add-cube-cbrt 7.0

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

      \[\leadsto \left(b \cdot c - 4.0 \cdot {\left(\sqrt[3]{i \cdot x + a \cdot t}\right)}^3\right) + \left(\left(y \cdot 18.0\right) \cdot \left(z \cdot \left(t \cdot x\right)\right) - \left(27.0 \cdot j\right) \cdot k\right)\]
    8. Taylor expanded around inf 6.4

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

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

Runtime

Time bar (total: 1.8m) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2539447477 665623002 1171730363 1327727951 3550980021 2300629962)'
(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)))