Average Error: 11.5 → 0.1
Time: 22.3s
Precision: 64
Internal precision: 128
\[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{t}{2.0 \cdot z}}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

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

Derivation

  1. Initial program 11.5

    \[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-num 11.6

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

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

Runtime

Time bar (total: 22.3s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1158069358 872368090 888354108 2066722682 1018761675 3654142514)'
(FPCore (x y z t)
  :name "Numeric.AD.Rank1.Halley:findZero from ad-4.2.4"

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

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