Average Error: 11.4 → 0.3
Time: 17.6s
Precision: 64
\[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}\]
\[x - \frac{1}{\sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5}} \cdot \frac{1}{\sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5} \cdot \sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5}}\]
x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}
x - \frac{1}{\sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5}} \cdot \frac{1}{\sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5} \cdot \sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5}}
double f(double x, double y, double z, double t) {
        double r22459798 = x;
        double r22459799 = y;
        double r22459800 = 2.0;
        double r22459801 = r22459799 * r22459800;
        double r22459802 = z;
        double r22459803 = r22459801 * r22459802;
        double r22459804 = r22459802 * r22459800;
        double r22459805 = r22459804 * r22459802;
        double r22459806 = t;
        double r22459807 = r22459799 * r22459806;
        double r22459808 = r22459805 - r22459807;
        double r22459809 = r22459803 / r22459808;
        double r22459810 = r22459798 - r22459809;
        return r22459810;
}

double f(double x, double y, double z, double t) {
        double r22459811 = x;
        double r22459812 = 1.0;
        double r22459813 = z;
        double r22459814 = y;
        double r22459815 = r22459813 / r22459814;
        double r22459816 = t;
        double r22459817 = r22459816 / r22459813;
        double r22459818 = 0.5;
        double r22459819 = r22459817 * r22459818;
        double r22459820 = r22459815 - r22459819;
        double r22459821 = cbrt(r22459820);
        double r22459822 = r22459812 / r22459821;
        double r22459823 = r22459821 * r22459821;
        double r22459824 = r22459812 / r22459823;
        double r22459825 = r22459822 * r22459824;
        double r22459826 = r22459811 - r22459825;
        return r22459826;
}

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.4
Target0.1
Herbie0.3
\[x - \frac{1}{\frac{z}{y} - \frac{\frac{t}{2}}{z}}\]

Derivation

  1. Initial program 11.4

    \[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}\]
  2. Simplified1.0

    \[\leadsto \color{blue}{x - \frac{y}{z - \frac{\frac{t}{z} \cdot y}{2}}}\]
  3. Using strategy rm
  4. Applied clear-num1.0

    \[\leadsto x - \color{blue}{\frac{1}{\frac{z - \frac{\frac{t}{z} \cdot y}{2}}{y}}}\]
  5. Taylor expanded around 0 0.1

    \[\leadsto x - \frac{1}{\color{blue}{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt0.3

    \[\leadsto x - \frac{1}{\color{blue}{\left(\sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}} \cdot \sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}\right) \cdot \sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}}}\]
  8. Applied *-un-lft-identity0.3

    \[\leadsto x - \frac{\color{blue}{1 \cdot 1}}{\left(\sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}} \cdot \sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}\right) \cdot \sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}}\]
  9. Applied times-frac0.3

    \[\leadsto x - \color{blue}{\frac{1}{\sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}} \cdot \sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}} \cdot \frac{1}{\sqrt[3]{\frac{z}{y} - 0.5 \cdot \frac{t}{z}}}}\]
  10. Final simplification0.3

    \[\leadsto x - \frac{1}{\sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5}} \cdot \frac{1}{\sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5} \cdot \sqrt[3]{\frac{z}{y} - \frac{t}{z} \cdot 0.5}}\]

Reproduce

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

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

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