Average Error: 3.3 → 1.8
Time: 47.0s
Precision: 64
Internal Precision: 384
\[\left(x - \frac{y}{z \cdot 3.0}\right) + \frac{t}{\left(z \cdot 3.0\right) \cdot y}\]
\[\left(x - \frac{y}{z \cdot 3.0}\right) + \frac{\frac{\frac{t}{z}}{3.0}}{y}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original3.3
Target1.8
Herbie1.8
\[\left(x - \frac{y}{z \cdot 3.0}\right) + \frac{\frac{t}{z \cdot 3.0}}{y}\]

Derivation

  1. Initial program 3.3

    \[\left(x - \frac{y}{z \cdot 3.0}\right) + \frac{t}{\left(z \cdot 3.0\right) \cdot y}\]
  2. Using strategy rm
  3. Applied associate-/r*1.8

    \[\leadsto \left(x - \frac{y}{z \cdot 3.0}\right) + \color{blue}{\frac{\frac{t}{z \cdot 3.0}}{y}}\]
  4. Using strategy rm
  5. Applied associate-/r*1.8

    \[\leadsto \left(x - \frac{y}{z \cdot 3.0}\right) + \frac{\color{blue}{\frac{\frac{t}{z}}{3.0}}}{y}\]
  6. Removed slow pow expressions.

Runtime

Time bar (total: 47.0s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"

  :herbie-target
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))