Average Error: 10.8 → 1.2
Time: 16.0s
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 r498458 = x;
        double r498459 = y;
        double r498460 = z;
        double r498461 = r498459 - r498460;
        double r498462 = t;
        double r498463 = r498461 * r498462;
        double r498464 = a;
        double r498465 = r498464 - r498460;
        double r498466 = r498463 / r498465;
        double r498467 = r498458 + r498466;
        return r498467;
}

double f(double x, double y, double z, double t, double a) {
        double r498468 = t;
        double r498469 = y;
        double r498470 = z;
        double r498471 = r498469 - r498470;
        double r498472 = a;
        double r498473 = r498472 - r498470;
        double r498474 = r498471 / r498473;
        double r498475 = r498468 * r498474;
        double r498476 = x;
        double r498477 = r498475 + r498476;
        return r498477;
}

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

Original10.8
Target0.6
Herbie1.2
\[\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 10.8

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

    \[\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.8

    \[\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.8

    \[\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.8

    \[\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.8

    \[\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. Simplified3.0

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

    \[\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.3

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

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

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

Reproduce

herbie shell --seed 2019303 
(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))))