Average Error: 14.7 → 19.5
Time: 14.9s
Precision: 64
\[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.324906406659230874915255796765929770075 \cdot 10^{-294} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0\right):\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{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.324906406659230874915255796765929770075 \cdot 10^{-294} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0\right):\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r83030 = x;
        double r83031 = y;
        double r83032 = z;
        double r83033 = r83031 - r83032;
        double r83034 = t;
        double r83035 = r83034 - r83030;
        double r83036 = a;
        double r83037 = r83036 - r83032;
        double r83038 = r83035 / r83037;
        double r83039 = r83033 * r83038;
        double r83040 = r83030 + r83039;
        return r83040;
}

double f(double x, double y, double z, double t, double a) {
        double r83041 = x;
        double r83042 = y;
        double r83043 = z;
        double r83044 = r83042 - r83043;
        double r83045 = t;
        double r83046 = r83045 - r83041;
        double r83047 = a;
        double r83048 = r83047 - r83043;
        double r83049 = r83046 / r83048;
        double r83050 = r83044 * r83049;
        double r83051 = r83041 + r83050;
        double r83052 = -2.324906406659231e-294;
        bool r83053 = r83051 <= r83052;
        double r83054 = 0.0;
        bool r83055 = r83051 <= r83054;
        double r83056 = !r83055;
        bool r83057 = r83053 || r83056;
        double r83058 = r83044 * r83046;
        double r83059 = r83058 / r83048;
        double r83060 = r83041 + r83059;
        double r83061 = r83041 * r83042;
        double r83062 = r83061 / r83043;
        double r83063 = r83062 + r83045;
        double r83064 = r83045 * r83042;
        double r83065 = r83064 / r83043;
        double r83066 = r83063 - r83065;
        double r83067 = r83057 ? r83060 : r83066;
        return r83067;
}

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.324906406659231e-294 or 3.350818656915189e-25 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 3.168095237227623e+301

    1. Initial program 5.3

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

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

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

    if -2.324906406659231e-294 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 0.0

    1. Initial program 61.5

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

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

    if 0.0 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 3.350818656915189e-25 or 3.168095237227623e+301 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 19.0

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

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

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t - x}{a - z}}\]
    6. Using strategy rm
    7. Applied associate-*r/7.4

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

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

Reproduce

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