Average Error: 14.9 → 12.1
Time: 1.1m
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le 1.86312971232961047458763075242073472727 \cdot 10^{236}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt[3]{y - z}} \cdot \sqrt[3]{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}\right) \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}\right) + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right) - \frac{t \cdot y}{z}\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;z \le 1.86312971232961047458763075242073472727 \cdot 10^{236}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\sqrt[3]{y - z}} \cdot \sqrt[3]{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}\right) \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}\right) + x\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r5638357 = x;
        double r5638358 = y;
        double r5638359 = z;
        double r5638360 = r5638358 - r5638359;
        double r5638361 = t;
        double r5638362 = r5638361 - r5638357;
        double r5638363 = a;
        double r5638364 = r5638363 - r5638359;
        double r5638365 = r5638362 / r5638364;
        double r5638366 = r5638360 * r5638365;
        double r5638367 = r5638357 + r5638366;
        return r5638367;
}

double f(double x, double y, double z, double t, double a) {
        double r5638368 = z;
        double r5638369 = 1.8631297123296105e+236;
        bool r5638370 = r5638368 <= r5638369;
        double r5638371 = y;
        double r5638372 = r5638371 - r5638368;
        double r5638373 = cbrt(r5638372);
        double r5638374 = cbrt(r5638373);
        double r5638375 = r5638373 * r5638373;
        double r5638376 = cbrt(r5638375);
        double r5638377 = r5638374 * r5638376;
        double r5638378 = r5638377 * r5638373;
        double r5638379 = a;
        double r5638380 = r5638379 - r5638368;
        double r5638381 = cbrt(r5638380);
        double r5638382 = r5638378 / r5638381;
        double r5638383 = t;
        double r5638384 = x;
        double r5638385 = r5638383 - r5638384;
        double r5638386 = r5638385 / r5638381;
        double r5638387 = r5638373 / r5638381;
        double r5638388 = r5638386 * r5638387;
        double r5638389 = r5638382 * r5638388;
        double r5638390 = r5638389 + r5638384;
        double r5638391 = r5638384 / r5638368;
        double r5638392 = fma(r5638391, r5638371, r5638383);
        double r5638393 = r5638383 * r5638371;
        double r5638394 = r5638393 / r5638368;
        double r5638395 = r5638392 - r5638394;
        double r5638396 = r5638370 ? r5638390 : r5638395;
        return r5638396;
}

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 < 1.8631297123296105e+236

    1. Initial program 13.7

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

      \[\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*11.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. Simplified11.7

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

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

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

      \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\right)}\]
    12. Using strategy rm
    13. Applied add-cube-cbrt11.4

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

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

    if 1.8631297123296105e+236 < z

    1. Initial program 31.6

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
    2. Taylor expanded around inf 23.6

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

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

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

Reproduce

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