Average Error: 11.3 → 1.0
Time: 4.8s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot t}{a - z}\]
\[\frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}{\sqrt[3]{t}}} \cdot \frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z}}{y - z}} + x\]
x + \frac{\left(y - z\right) \cdot t}{a - z}
\frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}{\sqrt[3]{t}}} \cdot \frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z}}{y - z}} + x
double f(double x, double y, double z, double t, double a) {
        double r616239 = x;
        double r616240 = y;
        double r616241 = z;
        double r616242 = r616240 - r616241;
        double r616243 = t;
        double r616244 = r616242 * r616243;
        double r616245 = a;
        double r616246 = r616245 - r616241;
        double r616247 = r616244 / r616246;
        double r616248 = r616239 + r616247;
        return r616248;
}

double f(double x, double y, double z, double t, double a) {
        double r616249 = t;
        double r616250 = cbrt(r616249);
        double r616251 = a;
        double r616252 = z;
        double r616253 = r616251 - r616252;
        double r616254 = cbrt(r616253);
        double r616255 = r616254 * r616254;
        double r616256 = r616255 / r616250;
        double r616257 = r616250 / r616256;
        double r616258 = y;
        double r616259 = r616258 - r616252;
        double r616260 = r616254 / r616259;
        double r616261 = r616250 / r616260;
        double r616262 = r616257 * r616261;
        double r616263 = x;
        double r616264 = r616262 + r616263;
        return r616264;
}

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.3
Target0.5
Herbie1.0
\[\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.3

    \[x + \frac{\left(y - z\right) \cdot t}{a - z}\]
  2. Simplified1.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt1.8

    \[\leadsto \mathsf{fma}\left(\frac{y - z}{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}, t, x\right)\]
  5. Applied associate-/r*1.8

    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{a - z}}}, t, x\right)\]
  6. Using strategy rm
  7. Applied fma-udef1.8

    \[\leadsto \color{blue}{\frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{a - z}} \cdot t + x}\]
  8. Simplified1.2

    \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} + x\]
  9. Using strategy rm
  10. Applied *-un-lft-identity1.2

    \[\leadsto \frac{t}{\frac{a - z}{\color{blue}{1 \cdot \left(y - z\right)}}} + x\]
  11. Applied add-cube-cbrt1.7

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

    \[\leadsto \frac{t}{\color{blue}{\frac{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}{1} \cdot \frac{\sqrt[3]{a - z}}{y - z}}} + x\]
  13. Applied add-cube-cbrt1.9

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

    \[\leadsto \color{blue}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\frac{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}{1}} \cdot \frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z}}{y - z}}} + x\]
  15. Simplified1.0

    \[\leadsto \color{blue}{\frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}{\sqrt[3]{t}}}} \cdot \frac{\sqrt[3]{t}}{\frac{\sqrt[3]{a - z}}{y - z}} + x\]
  16. Final simplification1.0

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

Reproduce

herbie shell --seed 2019353 +o rules:numerics
(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))))