Average Error: 14.9 → 10.2
Time: 4.8s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -7.116182529525504049557262627853464869068 \cdot 10^{-190} \lor \neg \left(a \le 6.559704169034857271833525661466055522025 \cdot 10^{-143}\right):\\ \;\;\;\;x + 1 \cdot \left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right)\\ \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}\;a \le -7.116182529525504049557262627853464869068 \cdot 10^{-190} \lor \neg \left(a \le 6.559704169034857271833525661466055522025 \cdot 10^{-143}\right):\\
\;\;\;\;x + 1 \cdot \left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right)\\

\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 r126783 = x;
        double r126784 = y;
        double r126785 = z;
        double r126786 = r126784 - r126785;
        double r126787 = t;
        double r126788 = r126787 - r126783;
        double r126789 = a;
        double r126790 = r126789 - r126785;
        double r126791 = r126788 / r126790;
        double r126792 = r126786 * r126791;
        double r126793 = r126783 + r126792;
        return r126793;
}

double f(double x, double y, double z, double t, double a) {
        double r126794 = a;
        double r126795 = -7.116182529525504e-190;
        bool r126796 = r126794 <= r126795;
        double r126797 = 6.559704169034857e-143;
        bool r126798 = r126794 <= r126797;
        double r126799 = !r126798;
        bool r126800 = r126796 || r126799;
        double r126801 = x;
        double r126802 = 1.0;
        double r126803 = t;
        double r126804 = r126803 - r126801;
        double r126805 = y;
        double r126806 = z;
        double r126807 = r126805 - r126806;
        double r126808 = r126794 - r126806;
        double r126809 = r126807 / r126808;
        double r126810 = r126804 * r126809;
        double r126811 = r126802 * r126810;
        double r126812 = r126801 + r126811;
        double r126813 = r126801 * r126805;
        double r126814 = r126813 / r126806;
        double r126815 = r126814 + r126803;
        double r126816 = r126803 * r126805;
        double r126817 = r126816 / r126806;
        double r126818 = r126815 - r126817;
        double r126819 = r126800 ? r126812 : r126818;
        return r126819;
}

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 a < -7.116182529525504e-190 or 6.559704169034857e-143 < a

    1. Initial program 12.1

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
    2. Using strategy rm
    3. Applied div-inv12.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-lft-identity12.1

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

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

      \[\leadsto x + 1 \cdot \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(y - z\right)\right)}\]
    8. Using strategy rm
    9. Applied div-inv12.1

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

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

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

    if -7.116182529525504e-190 < a < 6.559704169034857e-143

    1. Initial program 26.2

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

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

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

Reproduce

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