Average Error: 2.1 → 1.2
Time: 4.2s
Precision: binary64
\[x + \left(y - x\right) \cdot \frac{z}{t}\]
\[x + \frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{t}} \cdot \left(\frac{z}{\sqrt[3]{t}} \cdot \frac{\sqrt[3]{y - x}}{\sqrt[3]{t}}\right)\]
x + \left(y - x\right) \cdot \frac{z}{t}
x + \frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{t}} \cdot \left(\frac{z}{\sqrt[3]{t}} \cdot \frac{\sqrt[3]{y - x}}{\sqrt[3]{t}}\right)
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
(FPCore (x y z t)
 :precision binary64
 (+
  x
  (*
   (/ (* (cbrt (- y x)) (cbrt (- y x))) (cbrt t))
   (* (/ z (cbrt t)) (/ (cbrt (- y x)) (cbrt t))))))
double code(double x, double y, double z, double t) {
	return ((double) (x + ((double) (((double) (y - x)) * (z / t)))));
}
double code(double x, double y, double z, double t) {
	return ((double) (x + ((double) ((((double) (((double) cbrt(((double) (y - x)))) * ((double) cbrt(((double) (y - x)))))) / ((double) cbrt(t))) * ((double) ((z / ((double) cbrt(t))) * (((double) cbrt(((double) (y - x)))) / ((double) cbrt(t)))))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.1
Target2.3
Herbie1.2
\[\begin{array}{l} \mathbf{if}\;\left(y - x\right) \cdot \frac{z}{t} < -1013646692435.8867:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \mathbf{elif}\;\left(y - x\right) \cdot \frac{z}{t} < -0:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array}\]

Derivation

  1. Initial program Error: 2.1 bits

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

    \[\leadsto x + \left(y - x\right) \cdot \frac{z}{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}}\]
  4. Applied *-un-lft-identityError: 2.6 bits

    \[\leadsto x + \left(y - x\right) \cdot \frac{\color{blue}{1 \cdot z}}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}\]
  5. Applied times-fracError: 2.6 bits

    \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\left(\frac{1}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}\right)}\]
  6. Applied associate-*r*Error: 4.4 bits

    \[\leadsto x + \color{blue}{\left(\left(y - x\right) \cdot \frac{1}{\sqrt[3]{t} \cdot \sqrt[3]{t}}\right) \cdot \frac{z}{\sqrt[3]{t}}}\]
  7. SimplifiedError: 4.4 bits

    \[\leadsto x + \color{blue}{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \frac{z}{\sqrt[3]{t}}\]
  8. Using strategy rm
  9. Applied add-cube-cbrtError: 4.5 bits

    \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}\right) \cdot \sqrt[3]{y - x}}}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}\]
  10. Applied times-fracError: 4.5 bits

    \[\leadsto x + \color{blue}{\left(\frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{t}} \cdot \frac{\sqrt[3]{y - x}}{\sqrt[3]{t}}\right)} \cdot \frac{z}{\sqrt[3]{t}}\]
  11. Applied associate-*l*Error: 1.2 bits

    \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{t}} \cdot \left(\frac{\sqrt[3]{y - x}}{\sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}\right)}\]
  12. SimplifiedError: 1.2 bits

    \[\leadsto x + \frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{t}} \cdot \color{blue}{\left(\frac{z}{\sqrt[3]{t}} \cdot \frac{\sqrt[3]{y - x}}{\sqrt[3]{t}}\right)}\]
  13. Final simplificationError: 1.2 bits

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

Reproduce

herbie shell --seed 2020204 
(FPCore (x y z t)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
  :precision binary64

  :herbie-target
  (if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))

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