Average Error: 6.9 → 0.4
Time: 10.9s
Precision: 64
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\]
\[\frac{\left(x + \frac{y}{t - \frac{x}{z}}\right) - \frac{1}{\sqrt[3]{t \cdot z - x} \cdot \sqrt[3]{t \cdot z - x}} \cdot \frac{x}{\sqrt[3]{t \cdot z - x}}}{x + 1}\]
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\frac{\left(x + \frac{y}{t - \frac{x}{z}}\right) - \frac{1}{\sqrt[3]{t \cdot z - x} \cdot \sqrt[3]{t \cdot z - x}} \cdot \frac{x}{\sqrt[3]{t \cdot z - x}}}{x + 1}
double f(double x, double y, double z, double t) {
        double r647683 = x;
        double r647684 = y;
        double r647685 = z;
        double r647686 = r647684 * r647685;
        double r647687 = r647686 - r647683;
        double r647688 = t;
        double r647689 = r647688 * r647685;
        double r647690 = r647689 - r647683;
        double r647691 = r647687 / r647690;
        double r647692 = r647683 + r647691;
        double r647693 = 1.0;
        double r647694 = r647683 + r647693;
        double r647695 = r647692 / r647694;
        return r647695;
}

double f(double x, double y, double z, double t) {
        double r647696 = x;
        double r647697 = y;
        double r647698 = t;
        double r647699 = z;
        double r647700 = r647696 / r647699;
        double r647701 = r647698 - r647700;
        double r647702 = r647697 / r647701;
        double r647703 = r647696 + r647702;
        double r647704 = 1.0;
        double r647705 = r647698 * r647699;
        double r647706 = r647705 - r647696;
        double r647707 = cbrt(r647706);
        double r647708 = r647707 * r647707;
        double r647709 = r647704 / r647708;
        double r647710 = r647696 / r647707;
        double r647711 = r647709 * r647710;
        double r647712 = r647703 - r647711;
        double r647713 = 1.0;
        double r647714 = r647696 + r647713;
        double r647715 = r647712 / r647714;
        return r647715;
}

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

Original6.9
Target0.3
Herbie0.4
\[\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}\]

Derivation

  1. Initial program 6.9

    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\]
  2. Using strategy rm
  3. Applied div-sub6.9

    \[\leadsto \frac{x + \color{blue}{\left(\frac{y \cdot z}{t \cdot z - x} - \frac{x}{t \cdot z - x}\right)}}{x + 1}\]
  4. Applied associate-+r-6.9

    \[\leadsto \frac{\color{blue}{\left(x + \frac{y \cdot z}{t \cdot z - x}\right) - \frac{x}{t \cdot z - x}}}{x + 1}\]
  5. Using strategy rm
  6. Applied associate-/l*2.2

    \[\leadsto \frac{\left(x + \color{blue}{\frac{y}{\frac{t \cdot z - x}{z}}}\right) - \frac{x}{t \cdot z - x}}{x + 1}\]
  7. Taylor expanded around 0 0.3

    \[\leadsto \frac{\left(x + \frac{y}{\color{blue}{t - \frac{x}{z}}}\right) - \frac{x}{t \cdot z - x}}{x + 1}\]
  8. Using strategy rm
  9. Applied add-cube-cbrt0.4

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

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

    \[\leadsto \frac{\left(x + \frac{y}{t - \frac{x}{z}}\right) - \color{blue}{\frac{1}{\sqrt[3]{t \cdot z - x} \cdot \sqrt[3]{t \cdot z - x}} \cdot \frac{x}{\sqrt[3]{t \cdot z - x}}}}{x + 1}\]
  12. Final simplification0.4

    \[\leadsto \frac{\left(x + \frac{y}{t - \frac{x}{z}}\right) - \frac{1}{\sqrt[3]{t \cdot z - x} \cdot \sqrt[3]{t \cdot z - x}} \cdot \frac{x}{\sqrt[3]{t \cdot z - x}}}{x + 1}\]

Reproduce

herbie shell --seed 2020045 
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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