Average Error: 11.2 → 0.1
Time: 44.0s
Precision: 64
Internal Precision: 384
\[x - \frac{\left(y \cdot 2.0\right) \cdot z}{\left(z \cdot 2.0\right) \cdot z - y \cdot t}\]
\[x - \frac{1}{\frac{z}{y} - \frac{\frac{t}{2.0}}{z}}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original11.2
Target0.1
Herbie0.1
\[x - \frac{1}{\frac{z}{y} - \frac{\frac{t}{2.0}}{z}}\]

Derivation

  1. Initial program 11.2

    \[x - \frac{\left(y \cdot 2.0\right) \cdot z}{\left(z \cdot 2.0\right) \cdot z - y \cdot t}\]
  2. Using strategy rm
  3. Applied clear-num11.2

    \[\leadsto x - \color{blue}{\frac{1}{\frac{\left(z \cdot 2.0\right) \cdot z - y \cdot t}{\left(y \cdot 2.0\right) \cdot z}}}\]
  4. Applied simplify0.1

    \[\leadsto x - \frac{1}{\color{blue}{\frac{z}{y} - \frac{\frac{t}{2.0}}{z}}}\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 44.0s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y z t)
  :name "Numeric.AD.Rank1.Halley:findZero from ad-4.2.4"

  :herbie-target
  (- x (/ 1 (- (/ z y) (/ (/ t 2.0) z))))

  (- x (/ (* (* y 2.0) z) (- (* (* z 2.0) z) (* y t)))))