Average Error: 6.3 → 2.3
Time: 12.8s
Precision: 64
\[x + \frac{y \cdot \left(z - x\right)}{t}\]
\[x + \frac{1}{\frac{t}{y}} \cdot \left(z - x\right)\]
x + \frac{y \cdot \left(z - x\right)}{t}
x + \frac{1}{\frac{t}{y}} \cdot \left(z - x\right)
double f(double x, double y, double z, double t) {
        double r269567 = x;
        double r269568 = y;
        double r269569 = z;
        double r269570 = r269569 - r269567;
        double r269571 = r269568 * r269570;
        double r269572 = t;
        double r269573 = r269571 / r269572;
        double r269574 = r269567 + r269573;
        return r269574;
}

double f(double x, double y, double z, double t) {
        double r269575 = x;
        double r269576 = 1.0;
        double r269577 = t;
        double r269578 = y;
        double r269579 = r269577 / r269578;
        double r269580 = r269576 / r269579;
        double r269581 = z;
        double r269582 = r269581 - r269575;
        double r269583 = r269580 * r269582;
        double r269584 = r269575 + r269583;
        return r269584;
}

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.3
Target2.1
Herbie2.3
\[x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right)\]

Derivation

  1. Initial program 6.3

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

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

    \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{t}{y}}{z - x}}}\]
  6. Using strategy rm
  7. Applied div-inv2.2

    \[\leadsto x + \frac{1}{\color{blue}{\frac{t}{y} \cdot \frac{1}{z - x}}}\]
  8. Applied add-cube-cbrt2.2

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

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{t}{y}}} \cdot \frac{\sqrt[3]{1}}{\frac{1}{z - x}}\]
  11. Simplified2.3

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

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

Reproduce

herbie shell --seed 2019208 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
  :precision binary64

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

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