Average Error: 15.1 → 11.7
Time: 5.5s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le 3.181957455920012970372053438428864888089 \cdot 10^{242}:\\ \;\;\;\;x + {\left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right)}^{1}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;z \le 3.181957455920012970372053438428864888089 \cdot 10^{242}:\\
\;\;\;\;x + {\left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right)}^{1}\\

\mathbf{else}:\\
\;\;\;\;t\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r142892 = x;
        double r142893 = y;
        double r142894 = z;
        double r142895 = r142893 - r142894;
        double r142896 = t;
        double r142897 = r142896 - r142892;
        double r142898 = a;
        double r142899 = r142898 - r142894;
        double r142900 = r142897 / r142899;
        double r142901 = r142895 * r142900;
        double r142902 = r142892 + r142901;
        return r142902;
}

double f(double x, double y, double z, double t, double a) {
        double r142903 = z;
        double r142904 = 3.181957455920013e+242;
        bool r142905 = r142903 <= r142904;
        double r142906 = x;
        double r142907 = t;
        double r142908 = r142907 - r142906;
        double r142909 = y;
        double r142910 = r142909 - r142903;
        double r142911 = a;
        double r142912 = r142911 - r142903;
        double r142913 = r142910 / r142912;
        double r142914 = r142908 * r142913;
        double r142915 = 1.0;
        double r142916 = pow(r142914, r142915);
        double r142917 = r142906 + r142916;
        double r142918 = r142905 ? r142917 : r142907;
        return r142918;
}

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 < 3.181957455920013e+242

    1. Initial program 13.9

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

      \[\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 pow114.0

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

      \[\leadsto x + \left(y - z\right) \cdot \left(\color{blue}{{\left(t - x\right)}^{1}} \cdot {\left(\frac{1}{a - z}\right)}^{1}\right)\]
    7. Applied pow-prod-down14.0

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

      \[\leadsto x + \color{blue}{{\left(y - z\right)}^{1}} \cdot {\left(\left(t - x\right) \cdot \frac{1}{a - z}\right)}^{1}\]
    9. Applied pow-prod-down14.0

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

      \[\leadsto x + {\color{blue}{\left(\frac{t - x}{a - z} \cdot \left(y - z\right)\right)}}^{1}\]
    11. Using strategy rm
    12. Applied div-inv14.0

      \[\leadsto x + {\left(\color{blue}{\left(\left(t - x\right) \cdot \frac{1}{a - z}\right)} \cdot \left(y - z\right)\right)}^{1}\]
    13. Applied associate-*l*11.2

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

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

    if 3.181957455920013e+242 < z

    1. Initial program 32.9

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

      \[\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 pow132.9

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

      \[\leadsto x + \left(y - z\right) \cdot \left(\color{blue}{{\left(t - x\right)}^{1}} \cdot {\left(\frac{1}{a - z}\right)}^{1}\right)\]
    7. Applied pow-prod-down32.9

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{t - x}{a - z} \cdot \left(y - z\right)\right)}}^{1}\]
    11. Taylor expanded around 0 19.8

      \[\leadsto \color{blue}{t}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.7

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

Reproduce

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