Average Error: 11.1 → 1.0
Time: 4.3s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot t}{a - z}\]
\[\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{t}}{\sqrt[3]{a - z}} \cdot \left(y - z\right)\right) + x\]
x + \frac{\left(y - z\right) \cdot t}{a - z}
\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{t}}{\sqrt[3]{a - z}} \cdot \left(y - z\right)\right) + x
double f(double x, double y, double z, double t, double a) {
        double r541569 = x;
        double r541570 = y;
        double r541571 = z;
        double r541572 = r541570 - r541571;
        double r541573 = t;
        double r541574 = r541572 * r541573;
        double r541575 = a;
        double r541576 = r541575 - r541571;
        double r541577 = r541574 / r541576;
        double r541578 = r541569 + r541577;
        return r541578;
}

double f(double x, double y, double z, double t, double a) {
        double r541579 = t;
        double r541580 = cbrt(r541579);
        double r541581 = r541580 * r541580;
        double r541582 = a;
        double r541583 = z;
        double r541584 = r541582 - r541583;
        double r541585 = cbrt(r541584);
        double r541586 = r541585 * r541585;
        double r541587 = r541581 / r541586;
        double r541588 = r541580 / r541585;
        double r541589 = y;
        double r541590 = r541589 - r541583;
        double r541591 = r541588 * r541590;
        double r541592 = r541587 * r541591;
        double r541593 = x;
        double r541594 = r541592 + r541593;
        return r541594;
}

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.1
Target0.7
Herbie1.0
\[\begin{array}{l} \mathbf{if}\;t \lt -1.0682974490174067 \cdot 10^{-39}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot t\\ \mathbf{elif}\;t \lt 3.9110949887586375 \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.1

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

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

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

    \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{y - z}} \cdot t + x}\]
  7. Simplified2.9

    \[\leadsto \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} + x\]
  8. Using strategy rm
  9. Applied add-cube-cbrt3.4

    \[\leadsto \frac{t}{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}} \cdot \left(y - z\right) + x\]
  10. Applied add-cube-cbrt3.5

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

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

    \[\leadsto \color{blue}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{t}}{\sqrt[3]{a - z}} \cdot \left(y - z\right)\right)} + x\]
  13. Final simplification1.0

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

Reproduce

herbie shell --seed 2020081 +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))))