Average Error: 11.6 → 1.1
Time: 5.3s
Precision: 64
\[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}\]
\[x - \frac{y \cdot 2}{2 \cdot z - \frac{t}{z} \cdot y}\]
x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}
x - \frac{y \cdot 2}{2 \cdot z - \frac{t}{z} \cdot y}
double f(double x, double y, double z, double t) {
        double r417592 = x;
        double r417593 = y;
        double r417594 = 2.0;
        double r417595 = r417593 * r417594;
        double r417596 = z;
        double r417597 = r417595 * r417596;
        double r417598 = r417596 * r417594;
        double r417599 = r417598 * r417596;
        double r417600 = t;
        double r417601 = r417593 * r417600;
        double r417602 = r417599 - r417601;
        double r417603 = r417597 / r417602;
        double r417604 = r417592 - r417603;
        return r417604;
}

double f(double x, double y, double z, double t) {
        double r417605 = x;
        double r417606 = y;
        double r417607 = 2.0;
        double r417608 = r417606 * r417607;
        double r417609 = z;
        double r417610 = r417607 * r417609;
        double r417611 = t;
        double r417612 = r417611 / r417609;
        double r417613 = r417612 * r417606;
        double r417614 = r417610 - r417613;
        double r417615 = r417608 / r417614;
        double r417616 = r417605 - r417615;
        return r417616;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 11.6

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

    \[\leadsto x - \color{blue}{\frac{y \cdot 2}{\frac{\left(z \cdot 2\right) \cdot z - y \cdot t}{z}}}\]
  4. Taylor expanded around 0 2.8

    \[\leadsto x - \frac{y \cdot 2}{\color{blue}{2 \cdot z - \frac{t \cdot y}{z}}}\]
  5. Using strategy rm
  6. Applied associate-/l*2.3

    \[\leadsto x - \frac{y \cdot 2}{2 \cdot z - \color{blue}{\frac{t}{\frac{z}{y}}}}\]
  7. Using strategy rm
  8. Applied associate-/r/1.1

    \[\leadsto x - \frac{y \cdot 2}{2 \cdot z - \color{blue}{\frac{t}{z} \cdot y}}\]
  9. Final simplification1.1

    \[\leadsto x - \frac{y \cdot 2}{2 \cdot z - \frac{t}{z} \cdot y}\]

Reproduce

herbie shell --seed 2019308 
(FPCore (x y z t)
  :name "Numeric.AD.Rank1.Halley:findZero from ad-4.2.4"
  :precision binary64

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

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