Average Error: 14.8 → 10.8
Time: 43.0s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -1.1352522607078018 \cdot 10^{-210}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)\\ \mathbf{elif}\;a \le 9.28745641578995 \cdot 10^{-118}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -1.1352522607078018 \cdot 10^{-210}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)\\

\mathbf{elif}\;a \le 9.28745641578995 \cdot 10^{-118}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r5429130 = x;
        double r5429131 = y;
        double r5429132 = z;
        double r5429133 = r5429131 - r5429132;
        double r5429134 = t;
        double r5429135 = r5429134 - r5429130;
        double r5429136 = a;
        double r5429137 = r5429136 - r5429132;
        double r5429138 = r5429135 / r5429137;
        double r5429139 = r5429133 * r5429138;
        double r5429140 = r5429130 + r5429139;
        return r5429140;
}

double f(double x, double y, double z, double t, double a) {
        double r5429141 = a;
        double r5429142 = -1.1352522607078018e-210;
        bool r5429143 = r5429141 <= r5429142;
        double r5429144 = x;
        double r5429145 = cbrt(r5429144);
        double r5429146 = r5429145 * r5429145;
        double r5429147 = t;
        double r5429148 = r5429147 - r5429144;
        double r5429149 = z;
        double r5429150 = r5429141 - r5429149;
        double r5429151 = cbrt(r5429150);
        double r5429152 = r5429148 / r5429151;
        double r5429153 = y;
        double r5429154 = r5429153 - r5429149;
        double r5429155 = r5429151 * r5429151;
        double r5429156 = r5429154 / r5429155;
        double r5429157 = r5429152 * r5429156;
        double r5429158 = fma(r5429146, r5429145, r5429157);
        double r5429159 = 9.28745641578995e-118;
        bool r5429160 = r5429141 <= r5429159;
        double r5429161 = r5429144 / r5429149;
        double r5429162 = r5429147 / r5429149;
        double r5429163 = r5429161 - r5429162;
        double r5429164 = fma(r5429153, r5429163, r5429147);
        double r5429165 = r5429160 ? r5429164 : r5429158;
        double r5429166 = r5429143 ? r5429158 : r5429165;
        return r5429166;
}

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 < -1.1352522607078018e-210 or 9.28745641578995e-118 < a

    1. Initial program 12.0

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

      \[\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.2

      \[\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. Using strategy rm
    9. Applied add-cube-cbrt10.7

      \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\]
    10. Applied fma-def10.7

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\right)}\]

    if -1.1352522607078018e-210 < a < 9.28745641578995e-118

    1. Initial program 25.4

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}\]
    3. Taylor expanded around inf 13.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -1.1352522607078018 \cdot 10^{-210}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)\\ \mathbf{elif}\;a \le 9.28745641578995 \cdot 10^{-118}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019158 +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)))))