Average Error: 14.8 → 11.2
Time: 25.3s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le 2.50414955829154808293581188597119089035 \cdot 10^{179}:\\ \;\;\;\;\left(\frac{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}}\right) \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;z \le 2.50414955829154808293581188597119089035 \cdot 10^{179}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}}\right) \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} + x\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r5128269 = x;
        double r5128270 = y;
        double r5128271 = z;
        double r5128272 = r5128270 - r5128271;
        double r5128273 = t;
        double r5128274 = r5128273 - r5128269;
        double r5128275 = a;
        double r5128276 = r5128275 - r5128271;
        double r5128277 = r5128274 / r5128276;
        double r5128278 = r5128272 * r5128277;
        double r5128279 = r5128269 + r5128278;
        return r5128279;
}

double f(double x, double y, double z, double t, double a) {
        double r5128280 = z;
        double r5128281 = 2.504149558291548e+179;
        bool r5128282 = r5128280 <= r5128281;
        double r5128283 = t;
        double r5128284 = x;
        double r5128285 = r5128283 - r5128284;
        double r5128286 = a;
        double r5128287 = r5128286 - r5128280;
        double r5128288 = cbrt(r5128287);
        double r5128289 = r5128285 / r5128288;
        double r5128290 = cbrt(r5128289);
        double r5128291 = r5128290 / r5128288;
        double r5128292 = y;
        double r5128293 = r5128292 - r5128280;
        double r5128294 = r5128288 / r5128290;
        double r5128295 = r5128293 / r5128294;
        double r5128296 = r5128291 * r5128295;
        double r5128297 = r5128296 * r5128290;
        double r5128298 = r5128297 + r5128284;
        double r5128299 = r5128284 / r5128280;
        double r5128300 = r5128283 / r5128280;
        double r5128301 = r5128299 - r5128300;
        double r5128302 = fma(r5128292, r5128301, r5128283);
        double r5128303 = r5128282 ? r5128298 : r5128302;
        return r5128303;
}

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 z < 2.504149558291548e+179

    1. Initial program 12.8

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}\]
    3. Using strategy rm
    4. Applied fma-udef12.8

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt13.4

      \[\leadsto \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}}} + x\]
    7. Applied *-un-lft-identity13.4

      \[\leadsto \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}} + x\]
    8. Applied times-frac13.4

      \[\leadsto \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)} + x\]
    9. Applied associate-*r*10.9

      \[\leadsto \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}}} + x\]
    10. Simplified10.9

      \[\leadsto \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + x\]
    11. Using strategy rm
    12. Applied add-cube-cbrt11.1

      \[\leadsto \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right)} + x\]
    13. Applied associate-*r*11.1

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

      \[\leadsto \color{blue}{\frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}} \cdot \frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} + x\]
    15. Using strategy rm
    16. Applied *-un-lft-identity11.5

      \[\leadsto \frac{\color{blue}{1 \cdot \left(y - z\right)}}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}} \cdot \frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} + x\]
    17. Applied times-frac10.8

      \[\leadsto \color{blue}{\left(\frac{1}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}} \cdot \frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}}}\right)} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} + x\]
    18. Simplified10.8

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

    if 2.504149558291548e+179 < z

    1. Initial program 29.1

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

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

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

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

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

Reproduce

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