Average Error: 14.9 → 10.7
Time: 14.6min
Precision: binary64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -2.13818177103117769 \cdot 10^{136}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right) + t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;z \le -2.13818177103117769 \cdot 10^{136}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right) + t\\

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

\end{array}
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + ((double) (((double) (y - z)) * (((double) (t - x)) / ((double) (a - z)))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if ((z <= -2.1381817710311777e+136)) {
		VAR = ((double) (((double) ((y / z) * ((double) (x - t)))) + t));
	} else {
		VAR = ((double) (x + ((double) ((((double) (y - z)) / ((double) (a - z))) * ((double) (t - x))))));
	}
	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 2 regimes
  2. if z < -2.13818177103117769e136

    1. Initial program 27.8

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

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

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

    if -2.13818177103117769e136 < z

    1. Initial program 12.5

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

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

      \[\leadsto x + \color{blue}{\left(\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}\right) \cdot \left(\sqrt[3]{y - z} \cdot \frac{t - x}{a - z}\right)}\]
    5. Using strategy rm
    6. Applied pow113.1

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

      \[\leadsto x + \left(\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}\right) \cdot \left(\color{blue}{{\left(\sqrt[3]{y - z}\right)}^{1}} \cdot {\left(\frac{t - x}{a - z}\right)}^{1}\right)\]
    8. Applied pow-prod-down13.1

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

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

      \[\leadsto x + \left(\color{blue}{{\left(\sqrt[3]{y - z}\right)}^{1}} \cdot {\left(\sqrt[3]{y - z}\right)}^{1}\right) \cdot {\left(\sqrt[3]{y - z} \cdot \frac{t - x}{a - z}\right)}^{1}\]
    11. Applied pow-prod-down13.1

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}\right)}^{1}} \cdot {\left(\sqrt[3]{y - z} \cdot \frac{t - x}{a - z}\right)}^{1}\]
    12. Applied pow-prod-down13.1

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

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

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

Reproduce

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