Average Error: 15.0 → 10.2
Time: 16.6s
Precision: binary64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -7.37766926971836463 \cdot 10^{165} \lor \neg \left(z \le 8.49730539652018141 \cdot 10^{135}\right):\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \mathbf{else}:\\ \;\;\;\;x + \left(\sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)} \cdot \sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\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 -7.37766926971836463 \cdot 10^{165} \lor \neg \left(z \le 8.49730539652018141 \cdot 10^{135}\right):\\
\;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\

\mathbf{else}:\\
\;\;\;\;x + \left(\sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)} \cdot \sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\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) (((double) (t - x)) / ((double) (a - z))))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((z <= -7.377669269718365e+165) || !(z <= 8.497305396520181e+135))) {
		VAR = ((double) (((double) (y * ((double) (((double) (x / z)) - ((double) (t / z)))))) + t));
	} else {
		VAR = ((double) (x + ((double) (((double) (((double) cbrt(((double) (((double) (((double) (y - z)) / ((double) (a - z)))) * ((double) (t - x)))))) * ((double) cbrt(((double) (((double) (((double) (y - z)) / ((double) (a - z)))) * ((double) (t - x)))))))) * ((double) cbrt(((double) (((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 < -7.37766926971836463e165 or 8.49730539652018141e135 < z

    1. Initial program 28.5

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

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)}\]
    4. Using strategy rm
    5. Applied div-inv28.5

      \[\leadsto x + \left(y - z\right) \cdot \left(\frac{t}{a - z} - \color{blue}{x \cdot \frac{1}{a - z}}\right)\]
    6. Applied div-inv28.6

      \[\leadsto x + \left(y - z\right) \cdot \left(\color{blue}{t \cdot \frac{1}{a - z}} - x \cdot \frac{1}{a - z}\right)\]
    7. Applied distribute-rgt-out--28.6

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z}} \cdot \left(t - x\right)\]
    10. Using strategy rm
    11. Applied add-cube-cbrt24.7

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

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

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

    if -7.37766926971836463e165 < z < 8.49730539652018141e135

    1. Initial program 9.5

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

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)}\]
    4. Using strategy rm
    5. Applied div-inv9.5

      \[\leadsto x + \left(y - z\right) \cdot \left(\frac{t}{a - z} - \color{blue}{x \cdot \frac{1}{a - z}}\right)\]
    6. Applied div-inv9.6

      \[\leadsto x + \left(y - z\right) \cdot \left(\color{blue}{t \cdot \frac{1}{a - z}} - x \cdot \frac{1}{a - z}\right)\]
    7. Applied distribute-rgt-out--9.6

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z}} \cdot \left(t - x\right)\]
    10. Using strategy rm
    11. Applied add-cube-cbrt7.8

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -7.37766926971836463 \cdot 10^{165} \lor \neg \left(z \le 8.49730539652018141 \cdot 10^{135}\right):\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \mathbf{else}:\\ \;\;\;\;x + \left(\sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)} \cdot \sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\frac{y - z}{a - z} \cdot \left(t - x\right)}\\ \end{array}\]

Reproduce

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