Average Error: 6.3 → 1.4
Time: 7.3s
Precision: 64
\[x + \frac{\left(y - x\right) \cdot z}{t}\]
\[\begin{array}{l} \mathbf{if}\;t \le -5.121129492313333 \cdot 10^{35}:\\ \;\;\;\;x + \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}\right) \cdot \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \frac{z}{\sqrt[3]{t}}\right)\\ \mathbf{elif}\;t \le 1.0394980955783228 \cdot 10^{74}:\\ \;\;\;\;x + \frac{1}{\frac{t}{\left(y - x\right) \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}\right) \cdot \left(\left(\left(\sqrt[3]{\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}} \cdot \sqrt[3]{\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}}\right) \cdot \sqrt[3]{\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}}\right) \cdot \frac{z}{\sqrt[3]{t}}\right)\\ \end{array}\]
x + \frac{\left(y - x\right) \cdot z}{t}
\begin{array}{l}
\mathbf{if}\;t \le -5.121129492313333 \cdot 10^{35}:\\
\;\;\;\;x + \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}\right) \cdot \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \frac{z}{\sqrt[3]{t}}\right)\\

\mathbf{elif}\;t \le 1.0394980955783228 \cdot 10^{74}:\\
\;\;\;\;x + \frac{1}{\frac{t}{\left(y - x\right) \cdot z}}\\

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

\end{array}
double code(double x, double y, double z, double t) {
	return (x + (((y - x) * z) / t));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if ((t <= -5.121129492313333e+35)) {
		VAR = (x + ((cbrt(((y - x) / (cbrt(t) * cbrt(t)))) * cbrt(((y - x) / (cbrt(t) * cbrt(t))))) * (cbrt(((y - x) / (cbrt(t) * cbrt(t)))) * (z / cbrt(t)))));
	} else {
		double VAR_1;
		if ((t <= 1.0394980955783228e+74)) {
			VAR_1 = (x + (1.0 / (t / ((y - x) * z))));
		} else {
			VAR_1 = (x + ((cbrt(((y - x) / (cbrt(t) * cbrt(t)))) * cbrt(((y - x) / (cbrt(t) * cbrt(t))))) * (((cbrt(cbrt(((y - x) / (cbrt(t) * cbrt(t))))) * cbrt(cbrt(((y - x) / (cbrt(t) * cbrt(t)))))) * cbrt(cbrt(((y - x) / (cbrt(t) * cbrt(t)))))) * (z / cbrt(t)))));
		}
		VAR = VAR_1;
	}
	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.3
Target2.0
Herbie1.4
\[\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 3 regimes
  2. if t < -5.121129492313333e+35

    1. Initial program 10.4

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

      \[\leadsto x + \frac{\left(y - x\right) \cdot z}{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}}\]
    4. Applied times-frac0.8

      \[\leadsto x + \color{blue}{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt0.9

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

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

    if -5.121129492313333e+35 < t < 1.0394980955783228e+74

    1. Initial program 1.7

      \[x + \frac{\left(y - x\right) \cdot z}{t}\]
    2. Using strategy rm
    3. Applied clear-num1.7

      \[\leadsto x + \color{blue}{\frac{1}{\frac{t}{\left(y - x\right) \cdot z}}}\]

    if 1.0394980955783228e+74 < t

    1. Initial program 10.7

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

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

      \[\leadsto x + \color{blue}{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt1.1

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

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

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

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

Reproduce

herbie shell --seed 2020078 
(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)))