Average Error: 11.2 → 1.4
Time: 5.7s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot t}{a - z}\]
\[t \cdot \frac{y - z}{a - z} + x\]
x + \frac{\left(y - z\right) \cdot t}{a - z}
t \cdot \frac{y - z}{a - z} + x
double f(double x, double y, double z, double t, double a) {
        double r534721 = x;
        double r534722 = y;
        double r534723 = z;
        double r534724 = r534722 - r534723;
        double r534725 = t;
        double r534726 = r534724 * r534725;
        double r534727 = a;
        double r534728 = r534727 - r534723;
        double r534729 = r534726 / r534728;
        double r534730 = r534721 + r534729;
        return r534730;
}

double f(double x, double y, double z, double t, double a) {
        double r534731 = t;
        double r534732 = y;
        double r534733 = z;
        double r534734 = r534732 - r534733;
        double r534735 = a;
        double r534736 = r534735 - r534733;
        double r534737 = r534734 / r534736;
        double r534738 = r534731 * r534737;
        double r534739 = x;
        double r534740 = r534738 + r534739;
        return r534740;
}

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

Original11.2
Target0.5
Herbie1.4
\[\begin{array}{l} \mathbf{if}\;t \lt -1.068297449017406694366747246993994850729 \cdot 10^{-39}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot t\\ \mathbf{elif}\;t \lt 3.911094988758637497591020599238553861375 \cdot 10^{-141}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot t\\ \end{array}\]

Derivation

  1. Initial program 11.2

    \[x + \frac{\left(y - z\right) \cdot t}{a - z}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt11.5

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

    \[\leadsto x + \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t}{\sqrt[3]{a - z}}}\]
  5. Using strategy rm
  6. Applied pow11.7

    \[\leadsto x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \color{blue}{{\left(\frac{t}{\sqrt[3]{a - z}}\right)}^{1}}\]
  7. Applied pow11.7

    \[\leadsto x + \color{blue}{{\left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)}^{1}} \cdot {\left(\frac{t}{\sqrt[3]{a - z}}\right)}^{1}\]
  8. Applied pow-prod-down1.7

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

    \[\leadsto x + {\color{blue}{\left(\frac{t}{a - z} \cdot \left(y - z\right)\right)}}^{1}\]
  10. Using strategy rm
  11. Applied div-inv3.0

    \[\leadsto x + {\left(\color{blue}{\left(t \cdot \frac{1}{a - z}\right)} \cdot \left(y - z\right)\right)}^{1}\]
  12. Applied associate-*l*1.5

    \[\leadsto x + {\color{blue}{\left(t \cdot \left(\frac{1}{a - z} \cdot \left(y - z\right)\right)\right)}}^{1}\]
  13. Simplified1.4

    \[\leadsto x + {\left(t \cdot \color{blue}{\frac{y - z}{a - z}}\right)}^{1}\]
  14. Final simplification1.4

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

Reproduce

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

  :herbie-target
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

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