Average Error: 15.0 → 8.2
Time: 9.9s
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.50123148490570164 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 4.13589992567611142 \cdot 10^{-305}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 4.26248274753388979 \cdot 10^{306}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{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.50123148490570164 \cdot 10^{-250}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\

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

\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 4.26248274753388979 \cdot 10^{306}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\

\mathbf{else}:\\
\;\;\;\;x + \left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{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.5012314849057016e-250)) {
		VAR = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))) * ((double) (((double) (t - x)) / ((double) cbrt(((double) (a - z))))))))));
	} else {
		double VAR_1;
		if ((((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z)))))))) <= 4.1358999256761114e-305)) {
			VAR_1 = ((double) (((double) (((double) (((double) (x * y)) / z)) + t)) - ((double) (((double) (t * y)) / z))));
		} else {
			double VAR_2;
			if ((((double) (x + ((double) (((double) (y - z)) * ((double) (((double) (t - x)) / ((double) (a - z)))))))) <= 4.26248274753389e+306)) {
				VAR_2 = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))) * ((double) (((double) (t - x)) / ((double) cbrt(((double) (a - z))))))))));
			} else {
				VAR_2 = ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) * ((double) (1.0 / ((double) (a - z))))))));
			}
			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.50123148490570164e-250 or 4.13589992567611142e-305 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 4.26248274753388979e306

    1. Initial program 6.3

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

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

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

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

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

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

    if -2.50123148490570164e-250 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 4.13589992567611142e-305

    1. Initial program 59.0

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
    2. Taylor expanded around inf 26.7

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

    if 4.26248274753388979e306 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 57.6

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

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(\left(t - x\right) \cdot \frac{1}{a - z}\right)}\]
    4. Applied associate-*r*16.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le -2.50123148490570164 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 4.13589992567611142 \cdot 10^{-305}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 4.26248274753388979 \cdot 10^{306}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}\\ \end{array}\]

Reproduce

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