Average Error: 14.7 → 10.7
Time: 6.6s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -1.9980145513560385 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}, \frac{t - x}{\sqrt[3]{a - z}}, x\right)\\ \mathbf{elif}\;a \le 6.3246428879853097 \cdot 10^{-50}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{1} \cdot \left(\frac{\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\right) + x\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -1.9980145513560385 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}, \frac{t - x}{\sqrt[3]{a - z}}, x\right)\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r114451 = x;
        double r114452 = y;
        double r114453 = z;
        double r114454 = r114452 - r114453;
        double r114455 = t;
        double r114456 = r114455 - r114451;
        double r114457 = a;
        double r114458 = r114457 - r114453;
        double r114459 = r114456 / r114458;
        double r114460 = r114454 * r114459;
        double r114461 = r114451 + r114460;
        return r114461;
}

double f(double x, double y, double z, double t, double a) {
        double r114462 = a;
        double r114463 = -1.9980145513560385e-54;
        bool r114464 = r114462 <= r114463;
        double r114465 = y;
        double r114466 = z;
        double r114467 = r114465 - r114466;
        double r114468 = r114462 - r114466;
        double r114469 = cbrt(r114468);
        double r114470 = r114469 * r114469;
        double r114471 = r114467 / r114470;
        double r114472 = t;
        double r114473 = x;
        double r114474 = r114472 - r114473;
        double r114475 = r114474 / r114469;
        double r114476 = fma(r114471, r114475, r114473);
        double r114477 = 6.32464288798531e-50;
        bool r114478 = r114462 <= r114477;
        double r114479 = r114473 / r114466;
        double r114480 = r114472 / r114466;
        double r114481 = r114479 - r114480;
        double r114482 = fma(r114465, r114481, r114472);
        double r114483 = cbrt(r114467);
        double r114484 = r114483 * r114483;
        double r114485 = r114484 / r114469;
        double r114486 = 1.0;
        double r114487 = r114485 / r114486;
        double r114488 = r114483 / r114469;
        double r114489 = cbrt(r114470);
        double r114490 = r114488 / r114489;
        double r114491 = cbrt(r114469);
        double r114492 = r114474 / r114491;
        double r114493 = r114490 * r114492;
        double r114494 = r114487 * r114493;
        double r114495 = r114494 + r114473;
        double r114496 = r114478 ? r114482 : r114495;
        double r114497 = r114464 ? r114476 : r114496;
        return r114497;
}

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 3 regimes
  2. if a < -1.9980145513560385e-54

    1. Initial program 9.8

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

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

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

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

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

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

      \[\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. Simplified8.0

      \[\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 fma-def8.0

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

    if -1.9980145513560385e-54 < a < 6.32464288798531e-50

    1. Initial program 23.7

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

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

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

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

    if 6.32464288798531e-50 < a

    1. Initial program 8.7

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

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

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

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

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

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

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

      \[\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-cbrt7.3

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

      \[\leadsto \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\color{blue}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}}} + x\]
    14. Applied *-un-lft-identity7.3

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} + x\]
    18. Using strategy rm
    19. Applied *-un-lft-identity7.2

      \[\leadsto \frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\color{blue}{1 \cdot \sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} + x\]
    20. Applied add-cube-cbrt7.2

      \[\leadsto \frac{\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}}}{1 \cdot \sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} + x\]
    21. Applied times-frac7.2

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}}}{1 \cdot \sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} + x\]
    22. Applied times-frac7.2

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{1} \cdot \left(\frac{\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\right)} + x\]
  3. Recombined 3 regimes into one program.
  4. Final simplification10.7

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

Reproduce

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