Average Error: 1.6 → 0.6
Time: 16.1s
Precision: 64
\[x + y \cdot \frac{z - t}{a - t}\]
\[x + \left(y \cdot \frac{\sqrt[3]{\frac{1}{a - t}} \cdot \sqrt[3]{\frac{1}{a - t}}}{\sqrt[3]{\frac{1}{z - t}} \cdot \sqrt[3]{\frac{1}{z - t}}}\right) \cdot \frac{\sqrt[3]{\frac{1}{a - t}}}{\sqrt[3]{\frac{1}{z - t}}}\]
x + y \cdot \frac{z - t}{a - t}
x + \left(y \cdot \frac{\sqrt[3]{\frac{1}{a - t}} \cdot \sqrt[3]{\frac{1}{a - t}}}{\sqrt[3]{\frac{1}{z - t}} \cdot \sqrt[3]{\frac{1}{z - t}}}\right) \cdot \frac{\sqrt[3]{\frac{1}{a - t}}}{\sqrt[3]{\frac{1}{z - t}}}
double f(double x, double y, double z, double t, double a) {
        double r390603 = x;
        double r390604 = y;
        double r390605 = z;
        double r390606 = t;
        double r390607 = r390605 - r390606;
        double r390608 = a;
        double r390609 = r390608 - r390606;
        double r390610 = r390607 / r390609;
        double r390611 = r390604 * r390610;
        double r390612 = r390603 + r390611;
        return r390612;
}

double f(double x, double y, double z, double t, double a) {
        double r390613 = x;
        double r390614 = y;
        double r390615 = 1.0;
        double r390616 = a;
        double r390617 = t;
        double r390618 = r390616 - r390617;
        double r390619 = r390615 / r390618;
        double r390620 = cbrt(r390619);
        double r390621 = r390620 * r390620;
        double r390622 = z;
        double r390623 = r390622 - r390617;
        double r390624 = r390615 / r390623;
        double r390625 = cbrt(r390624);
        double r390626 = r390625 * r390625;
        double r390627 = r390621 / r390626;
        double r390628 = r390614 * r390627;
        double r390629 = r390620 / r390625;
        double r390630 = r390628 * r390629;
        double r390631 = r390613 + r390630;
        return r390631;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.6
Target0.4
Herbie0.6
\[\begin{array}{l} \mathbf{if}\;y \lt -8.508084860551241069024247453646278348229 \cdot 10^{-17}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \lt 2.894426862792089097262541964056085749132 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array}\]

Derivation

  1. Initial program 1.6

    \[x + y \cdot \frac{z - t}{a - t}\]
  2. Using strategy rm
  3. Applied clear-num1.7

    \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}}\]
  4. Using strategy rm
  5. Applied div-inv1.7

    \[\leadsto x + y \cdot \frac{1}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}}\]
  6. Applied associate-/r*1.7

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

    \[\leadsto x + y \cdot \frac{\frac{1}{a - t}}{\color{blue}{\left(\sqrt[3]{\frac{1}{z - t}} \cdot \sqrt[3]{\frac{1}{z - t}}\right) \cdot \sqrt[3]{\frac{1}{z - t}}}}\]
  9. Applied add-cube-cbrt2.0

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

    \[\leadsto x + y \cdot \color{blue}{\left(\frac{\sqrt[3]{\frac{1}{a - t}} \cdot \sqrt[3]{\frac{1}{a - t}}}{\sqrt[3]{\frac{1}{z - t}} \cdot \sqrt[3]{\frac{1}{z - t}}} \cdot \frac{\sqrt[3]{\frac{1}{a - t}}}{\sqrt[3]{\frac{1}{z - t}}}\right)}\]
  11. Applied associate-*r*0.6

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

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

Reproduce

herbie shell --seed 2019325 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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