Average Error: 14.9 → 8.3
Time: 1.2m
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \le -5.373786410763023350407955876767747404474 \cdot 10^{-308}:\\ \;\;\;\;\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} + x\\ \mathbf{elif}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \le 0.0:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \le -5.373786410763023350407955876767747404474 \cdot 10^{-308}:\\
\;\;\;\;\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} + x\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r6765980 = x;
        double r6765981 = y;
        double r6765982 = z;
        double r6765983 = r6765981 - r6765982;
        double r6765984 = t;
        double r6765985 = r6765984 - r6765980;
        double r6765986 = a;
        double r6765987 = r6765986 - r6765982;
        double r6765988 = r6765985 / r6765987;
        double r6765989 = r6765983 * r6765988;
        double r6765990 = r6765980 + r6765989;
        return r6765990;
}

double f(double x, double y, double z, double t, double a) {
        double r6765991 = t;
        double r6765992 = x;
        double r6765993 = r6765991 - r6765992;
        double r6765994 = a;
        double r6765995 = z;
        double r6765996 = r6765994 - r6765995;
        double r6765997 = r6765993 / r6765996;
        double r6765998 = y;
        double r6765999 = r6765998 - r6765995;
        double r6766000 = r6765997 * r6765999;
        double r6766001 = r6766000 + r6765992;
        double r6766002 = -5.373786410763023e-308;
        bool r6766003 = r6766001 <= r6766002;
        double r6766004 = cbrt(r6765996);
        double r6766005 = r6765993 / r6766004;
        double r6766006 = r6766004 * r6766004;
        double r6766007 = r6765999 / r6766006;
        double r6766008 = r6766005 * r6766007;
        double r6766009 = r6766008 + r6765992;
        double r6766010 = 0.0;
        bool r6766011 = r6766001 <= r6766010;
        double r6766012 = r6765992 / r6765995;
        double r6766013 = r6765991 / r6765995;
        double r6766014 = r6766012 - r6766013;
        double r6766015 = r6765998 * r6766014;
        double r6766016 = r6765991 + r6766015;
        double r6766017 = r6766011 ? r6766016 : r6766001;
        double r6766018 = r6766003 ? r6766009 : r6766017;
        return r6766018;
}

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)))) < -5.373786410763023e-308

    1. Initial program 7.5

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt8.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 *-un-lft-identity8.2

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

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

      \[\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. Simplified5.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}}\]

    if -5.373786410763023e-308 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 0.0

    1. Initial program 61.8

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

      \[\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-cbrt61.6

      \[\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-frac61.6

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

      \[\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. Simplified61.4

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

      \[\leadsto \color{blue}{\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}}\]
    9. Simplified20.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))))

    1. Initial program 7.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \le -5.373786410763023350407955876767747404474 \cdot 10^{-308}:\\ \;\;\;\;\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} + x\\ \mathbf{elif}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \le 0.0:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x\\ \end{array}\]

Reproduce

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