Average Error: 6.7 → 2.1
Time: 4.7s
Precision: 64
\[x + \frac{\left(y - x\right) \cdot z}{t}\]
\[\begin{array}{l} \mathbf{if}\;t \le -8.1754414467964256 \cdot 10^{-88}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) \cdot \frac{\sqrt[3]{y - x}}{\frac{t}{\sqrt[3]{z}}}\\ \end{array}\]
x + \frac{\left(y - x\right) \cdot z}{t}
\begin{array}{l}
\mathbf{if}\;t \le -8.1754414467964256 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\

\mathbf{else}:\\
\;\;\;\;x + \left(\left(\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) \cdot \frac{\sqrt[3]{y - x}}{\frac{t}{\sqrt[3]{z}}}\\

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (x + ((double) (((double) (((double) (y - x)) * z)) / t))));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if ((t <= -8.175441446796426e-88)) {
		VAR = ((double) (x + ((double) (((double) (((double) (y - x)) / t)) * z))));
	} else {
		VAR = ((double) (x + ((double) (((double) (((double) (((double) cbrt(((double) (y - x)))) * ((double) cbrt(((double) (y - x)))))) * ((double) (((double) cbrt(z)) * ((double) cbrt(z)))))) * ((double) (((double) cbrt(((double) (y - x)))) / ((double) (t / ((double) cbrt(z))))))))));
	}
	return VAR;
}

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

Original6.7
Target2.1
Herbie2.1
\[\begin{array}{l} \mathbf{if}\;x \lt -9.0255111955330046 \cdot 10^{-135}:\\ \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;x \lt 4.2750321637007147 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if t < -8.175441446796426e-88

    1. Initial program 8.4

      \[x + \frac{\left(y - x\right) \cdot z}{t}\]
    2. Using strategy rm
    3. Applied associate-/l*1.3

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}}\]
    4. Using strategy rm
    5. Applied associate-/r/2.3

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

    if -8.175441446796426e-88 < t

    1. Initial program 5.7

      \[x + \frac{\left(y - x\right) \cdot z}{t}\]
    2. Using strategy rm
    3. Applied associate-/l*2.3

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt2.9

      \[\leadsto x + \frac{y - x}{\frac{t}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}}\]
    6. Applied *-un-lft-identity2.9

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

      \[\leadsto x + \frac{y - x}{\color{blue}{\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{t}{\sqrt[3]{z}}}}\]
    8. Applied add-cube-cbrt3.1

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

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

      \[\leadsto x + \color{blue}{\left(\left(\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right)} \cdot \frac{\sqrt[3]{y - x}}{\frac{t}{\sqrt[3]{z}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -8.1754414467964256 \cdot 10^{-88}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) \cdot \frac{\sqrt[3]{y - x}}{\frac{t}{\sqrt[3]{z}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020129 
(FPCore (x y z t)
  :name "Numeric.Histogram:binBounds from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))

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