Average Error: 14.8 → 11.2
Time: 26.1s
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 r4884006 = x;
        double r4884007 = y;
        double r4884008 = z;
        double r4884009 = r4884007 - r4884008;
        double r4884010 = t;
        double r4884011 = r4884010 - r4884006;
        double r4884012 = a;
        double r4884013 = r4884012 - r4884008;
        double r4884014 = r4884011 / r4884013;
        double r4884015 = r4884009 * r4884014;
        double r4884016 = r4884006 + r4884015;
        return r4884016;
}

double f(double x, double y, double z, double t, double a) {
        double r4884017 = z;
        double r4884018 = 2.504149558291548e+179;
        bool r4884019 = r4884017 <= r4884018;
        double r4884020 = t;
        double r4884021 = x;
        double r4884022 = r4884020 - r4884021;
        double r4884023 = a;
        double r4884024 = r4884023 - r4884017;
        double r4884025 = cbrt(r4884024);
        double r4884026 = r4884022 / r4884025;
        double r4884027 = cbrt(r4884026);
        double r4884028 = r4884027 / r4884025;
        double r4884029 = y;
        double r4884030 = r4884029 - r4884017;
        double r4884031 = r4884025 / r4884027;
        double r4884032 = r4884030 / r4884031;
        double r4884033 = r4884028 * r4884032;
        double r4884034 = r4884033 * r4884027;
        double r4884035 = r4884034 + r4884021;
        double r4884036 = r4884021 / r4884017;
        double r4884037 = r4884020 / r4884017;
        double r4884038 = r4884036 - r4884037;
        double r4884039 = fma(r4884029, r4884038, r4884020);
        double r4884040 = r4884019 ? r4884035 : r4884039;
        return r4884040;
}

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)))))