Average Error: 14.7 → 11.3
Time: 12.8s
Precision: binary64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le 3.272611520635528 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{1}{\frac{a - z}{y - z}} \cdot \left(t - x\right)\\ \mathbf{elif}\;a \le 4.37670897524239548 \cdot 10^{-228}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{elif}\;a \le 1.429293235495582 \cdot 10^{-120} \lor \neg \left(a \le 7.830320865923943 \cdot 10^{-79}\right):\\ \;\;\;\;x + \frac{1}{\frac{a - z}{y - z}} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le 3.272611520635528 \cdot 10^{-272}:\\
\;\;\;\;x + \frac{1}{\frac{a - z}{y - z}} \cdot \left(t - x\right)\\

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

\mathbf{elif}\;a \le 1.429293235495582 \cdot 10^{-120} \lor \neg \left(a \le 7.830320865923943 \cdot 10^{-79}\right):\\
\;\;\;\;x + \frac{1}{\frac{a - z}{y - z}} \cdot \left(t - x\right)\\

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

\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 ((a <= 3.2726115206355276e-272)) {
		VAR = ((double) (x + ((double) (((double) (1.0 / ((double) (((double) (a - z)) / ((double) (y - z)))))) * ((double) (t - x))))));
	} else {
		double VAR_1;
		if ((a <= 4.3767089752423955e-228)) {
			VAR_1 = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
		} else {
			double VAR_2;
			if (((a <= 1.429293235495582e-120) || !(a <= 7.830320865923943e-79))) {
				VAR_2 = ((double) (x + ((double) (((double) (1.0 / ((double) (((double) (a - z)) / ((double) (y - z)))))) * ((double) (t - x))))));
			} else {
				VAR_2 = ((double) (t + ((double) (((double) (y / z)) * ((double) (x - t))))));
			}
			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 a < 3.272611520635528e-272 or 4.37670897524239548e-228 < a < 1.429293235495582e-120 or 7.830320865923943e-79 < a

    1. Initial program 14.2

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

      \[\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-identity14.7

      \[\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-frac14.8

      \[\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*12.2

      \[\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. Simplified12.2

      \[\leadsto x + \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\]
    8. Using strategy rm
    9. Applied pow112.2

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{y - z}{a - z} \cdot \left(t - x\right)\right)}}^{1}\]
    13. Using strategy rm
    14. Applied clear-num11.3

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

    if 3.272611520635528e-272 < a < 4.37670897524239548e-228

    1. Initial program 23.4

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

      \[\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 add-cube-cbrt24.4

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

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

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

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

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

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

    if 1.429293235495582e-120 < a < 7.830320865923943e-79

    1. Initial program 21.4

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le 3.272611520635528 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{1}{\frac{a - z}{y - z}} \cdot \left(t - x\right)\\ \mathbf{elif}\;a \le 4.37670897524239548 \cdot 10^{-228}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{elif}\;a \le 1.429293235495582 \cdot 10^{-120} \lor \neg \left(a \le 7.830320865923943 \cdot 10^{-79}\right):\\ \;\;\;\;x + \frac{1}{\frac{a - z}{y - z}} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\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)))))