Average Error: 14.9 → 7.6
Time: 9.7s
Precision: binary64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le -2.29615567927293194 \cdot 10^{-258}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 3.43597 \cdot 10^{10}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 1.46620079924322309 \cdot 10^{305}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le -2.29615567927293194 \cdot 10^{-258}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0:\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\

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

\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 1.46620079924322309 \cdot 10^{305}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\

\end{array}
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z))))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if ((((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z)))))))) <= -2.296155679272932e-258)) {
		VAR = ((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z))))))));
	} else {
		double VAR_1;
		if ((((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z)))))))) <= 0.0)) {
			VAR_1 = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
		} else {
			double VAR_2;
			if ((((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z)))))))) <= 34359738368.0)) {
				VAR_2 = ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z))))));
			} else {
				double VAR_3;
				if ((((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z)))))))) <= 1.466200799243223e+305)) {
					VAR_3 = ((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z))))))));
				} else {
					VAR_3 = ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z))))));
				}
				VAR_2 = VAR_3;
			}
			VAR_1 = VAR_2;
		}
		VAR = VAR_1;
	}
	return VAR;
}

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

Derivation

  1. Split input into 3 regimes
  2. if (+ x (* (- y z) (/ (- t x) (- a z)))) < -2.296155679272932e-258 or 34359738368.0 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 1.466200799243223e+305

    1. Initial program 4.8

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

    if -2.296155679272932e-258 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 0.0

    1. Initial program 60.0

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

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

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

      \[\leadsto x + \left(\sqrt[3]{\left(y - z\right) \cdot \frac{t - x}{a - z}} \cdot \sqrt[3]{\left(y - z\right) \cdot \frac{t - x}{a - z}}\right) \cdot \sqrt[3]{\color{blue}{\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{t - x}{a - z}} \cdot \sqrt[3]{\frac{t - x}{a - z}}\right)\right) \cdot \sqrt[3]{\frac{t - x}{a - z}}}}\]
    7. Taylor expanded around inf 26.3

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

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

    if 0.0 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 34359738368.0 or 1.466200799243223e+305 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 17.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le -2.29615567927293194 \cdot 10^{-258}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 3.43597 \cdot 10^{10}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 1.46620079924322309 \cdot 10^{305}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \end{array}\]

Reproduce

herbie shell --seed 2020148 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))