Average Error: 14.8 → 9.4
Time: 7.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 -9.626902398239246129223353523042009647643 \cdot 10^{-290} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 6.748669920530608158867735738796897387655 \cdot 10^{-230}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \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 -9.626902398239246129223353523042009647643 \cdot 10^{-290} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 6.748669920530608158867735738796897387655 \cdot 10^{-230}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r128858 = x;
        double r128859 = y;
        double r128860 = z;
        double r128861 = r128859 - r128860;
        double r128862 = t;
        double r128863 = r128862 - r128858;
        double r128864 = a;
        double r128865 = r128864 - r128860;
        double r128866 = r128863 / r128865;
        double r128867 = r128861 * r128866;
        double r128868 = r128858 + r128867;
        return r128868;
}

double f(double x, double y, double z, double t, double a) {
        double r128869 = x;
        double r128870 = y;
        double r128871 = z;
        double r128872 = r128870 - r128871;
        double r128873 = t;
        double r128874 = r128873 - r128869;
        double r128875 = a;
        double r128876 = r128875 - r128871;
        double r128877 = r128874 / r128876;
        double r128878 = r128872 * r128877;
        double r128879 = r128869 + r128878;
        double r128880 = -9.626902398239246e-290;
        bool r128881 = r128879 <= r128880;
        double r128882 = 6.748669920530608e-230;
        bool r128883 = r128879 <= r128882;
        double r128884 = !r128883;
        bool r128885 = r128881 || r128884;
        double r128886 = r128869 / r128871;
        double r128887 = r128873 / r128871;
        double r128888 = r128886 - r128887;
        double r128889 = r128870 * r128888;
        double r128890 = r128873 + r128889;
        double r128891 = r128885 ? r128879 : r128890;
        return r128891;
}

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 (+ x (* (- y z) (/ (- t x) (- a z)))) < -9.626902398239246e-290 or 6.748669920530608e-230 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 6.7

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

    if -9.626902398239246e-290 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 6.748669920530608e-230

    1. Initial program 57.7

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

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

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

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

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

Reproduce

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