Average Error: 6.5 → 1.3
Time: 4.9s
Precision: binary64
\[x + \frac{\left(y - x\right) \cdot z}{t}\]
\[\begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -3.359553345002256 \cdot 10^{+288}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -1.0555988803179481 \cdot 10^{-200}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y - x\right) \cdot \left(\sqrt[3]{z} \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{\sqrt[3]{z} \cdot \sqrt[3]{z}}}{\sqrt[3]{t} \cdot \sqrt[3]{t}}\right)\right)\right) \cdot \frac{\sqrt[3]{\sqrt[3]{z}}}{\sqrt[3]{t}}\\ \end{array}\]
x + \frac{\left(y - x\right) \cdot z}{t}
\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -3.359553345002256 \cdot 10^{+288}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\

\mathbf{elif}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -1.0555988803179481 \cdot 10^{-200}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\

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

\end{array}
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
(FPCore (x y z t)
 :precision binary64
 (if (<= (+ x (/ (* (- y x) z) t)) -3.359553345002256e+288)
   (+ x (* (- y x) (/ z t)))
   (if (<= (+ x (/ (* (- y x) z) t)) -1.0555988803179481e-200)
     (+ x (/ (* (- y x) z) t))
     (+
      x
      (*
       (*
        (- y x)
        (*
         (cbrt z)
         (* (cbrt z) (/ (cbrt (* (cbrt z) (cbrt z))) (* (cbrt t) (cbrt t))))))
       (/ (cbrt (cbrt z)) (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) {
	double tmp;
	if ((((double) (x + (((double) (((double) (y - x)) * z)) / t))) <= -3.359553345002256e+288)) {
		tmp = ((double) (x + ((double) (((double) (y - x)) * (z / t)))));
	} else {
		double tmp_1;
		if ((((double) (x + (((double) (((double) (y - x)) * z)) / t))) <= -1.0555988803179481e-200)) {
			tmp_1 = ((double) (x + (((double) (((double) (y - x)) * z)) / t)));
		} else {
			tmp_1 = ((double) (x + ((double) (((double) (((double) (y - x)) * ((double) (((double) cbrt(z)) * ((double) (((double) cbrt(z)) * (((double) cbrt(((double) (((double) cbrt(z)) * ((double) cbrt(z)))))) / ((double) (((double) cbrt(t)) * ((double) cbrt(t))))))))))) * (((double) cbrt(((double) cbrt(z)))) / ((double) cbrt(t)))))));
		}
		tmp = tmp_1;
	}
	return tmp;
}

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.5
Target2.1
Herbie1.3
\[\begin{array}{l} \mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\ \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;x < 4.275032163700715 \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 (+ x (/ (* (- y x) z) t)) < -3.35955334500225614e288

    1. Initial program Error: 44.9 bits

      \[x + \frac{\left(y - x\right) \cdot z}{t}\]
    2. SimplifiedError: 1.9 bits

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

    if -3.35955334500225614e288 < (+ x (/ (* (- y x) z) t)) < -1.0555988803179481e-200

    1. Initial program Error: 0.4 bits

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

    if -1.0555988803179481e-200 < (+ x (/ (* (- y x) z) t))

    1. Initial program Error: 6.7 bits

      \[x + \frac{\left(y - x\right) \cdot z}{t}\]
    2. SimplifiedError: 2.3 bits

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

      \[\leadsto x + \left(y - x\right) \cdot \frac{z}{\color{blue}{1 \cdot t}}\]
    5. Applied add-cube-cbrtError: 2.8 bits

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

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

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

      \[\leadsto x + \color{blue}{\left(\left(y - x\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right)} \cdot \frac{\sqrt[3]{z}}{t}\]
    9. Using strategy rm
    10. Applied add-cube-cbrtError: 4.6 bits

      \[\leadsto x + \left(\left(y - x\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) \cdot \frac{\sqrt[3]{z}}{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}}\]
    11. Applied add-cube-cbrtError: 4.6 bits

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -3.359553345002256 \cdot 10^{+288}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -1.0555988803179481 \cdot 10^{-200}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y - x\right) \cdot \left(\sqrt[3]{z} \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{\sqrt[3]{z} \cdot \sqrt[3]{z}}}{\sqrt[3]{t} \cdot \sqrt[3]{t}}\right)\right)\right) \cdot \frac{\sqrt[3]{\sqrt[3]{z}}}{\sqrt[3]{t}}\\ \end{array}\]

Reproduce

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