Average Error: 14.6 → 10.1
Time: 23.3s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -4.016598119805832112067423593203436782632 \cdot 10^{-193} \lor \neg \left(a \le 1.378728743140737444719887307656154525911 \cdot 10^{-126}\right):\\ \;\;\;\;\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right) - \frac{t}{\frac{z}{y}}\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -4.016598119805832112067423593203436782632 \cdot 10^{-193} \lor \neg \left(a \le 1.378728743140737444719887307656154525911 \cdot 10^{-126}\right):\\
\;\;\;\;\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + x\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right) - \frac{t}{\frac{z}{y}}\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r104049 = x;
        double r104050 = y;
        double r104051 = z;
        double r104052 = r104050 - r104051;
        double r104053 = t;
        double r104054 = r104053 - r104049;
        double r104055 = a;
        double r104056 = r104055 - r104051;
        double r104057 = r104054 / r104056;
        double r104058 = r104052 * r104057;
        double r104059 = r104049 + r104058;
        return r104059;
}

double f(double x, double y, double z, double t, double a) {
        double r104060 = a;
        double r104061 = -4.016598119805832e-193;
        bool r104062 = r104060 <= r104061;
        double r104063 = 1.3787287431407374e-126;
        bool r104064 = r104060 <= r104063;
        double r104065 = !r104064;
        bool r104066 = r104062 || r104065;
        double r104067 = y;
        double r104068 = z;
        double r104069 = r104067 - r104068;
        double r104070 = r104060 - r104068;
        double r104071 = cbrt(r104070);
        double r104072 = r104071 * r104071;
        double r104073 = r104069 / r104072;
        double r104074 = t;
        double r104075 = x;
        double r104076 = r104074 - r104075;
        double r104077 = r104076 / r104071;
        double r104078 = r104073 * r104077;
        double r104079 = r104078 + r104075;
        double r104080 = r104075 / r104068;
        double r104081 = fma(r104080, r104067, r104074);
        double r104082 = r104068 / r104067;
        double r104083 = r104074 / r104082;
        double r104084 = r104081 - r104083;
        double r104085 = r104066 ? r104079 : r104084;
        return r104085;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Derivation

  1. Split input into 2 regimes
  2. if a < -4.016598119805832e-193 or 1.3787287431407374e-126 < a

    1. Initial program 11.7

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

      \[\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. Simplified10.1

      \[\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 -4.016598119805832e-193 < a < 1.3787287431407374e-126

    1. Initial program 24.8

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

      \[\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-identity25.5

      \[\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-frac25.5

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -4.016598119805832112067423593203436782632 \cdot 10^{-193} \lor \neg \left(a \le 1.378728743140737444719887307656154525911 \cdot 10^{-126}\right):\\ \;\;\;\;\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right) - \frac{t}{\frac{z}{y}}\\ \end{array}\]

Reproduce

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