Average Error: 1.6 → 0.6
Time: 16.9s
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 r390316 = x;
        double r390317 = y;
        double r390318 = z;
        double r390319 = t;
        double r390320 = r390318 - r390319;
        double r390321 = a;
        double r390322 = r390321 - r390319;
        double r390323 = r390320 / r390322;
        double r390324 = r390317 * r390323;
        double r390325 = r390316 + r390324;
        return r390325;
}

double f(double x, double y, double z, double t, double a) {
        double r390326 = x;
        double r390327 = y;
        double r390328 = 1.0;
        double r390329 = a;
        double r390330 = t;
        double r390331 = r390329 - r390330;
        double r390332 = r390328 / r390331;
        double r390333 = cbrt(r390332);
        double r390334 = r390333 * r390333;
        double r390335 = z;
        double r390336 = r390335 - r390330;
        double r390337 = r390328 / r390336;
        double r390338 = cbrt(r390337);
        double r390339 = r390338 * r390338;
        double r390340 = r390334 / r390339;
        double r390341 = r390327 * r390340;
        double r390342 = r390333 / r390338;
        double r390343 = r390341 * r390342;
        double r390344 = r390326 + r390343;
        return r390344;
}

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)))))