Average Error: 14.8 → 10.9
Time: 33.6s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -8.741731478203489932433786908162679076106 \cdot 10^{-201} \lor \neg \left(a \le 3.17759089387443058571350167291573822101 \cdot 10^{-128}\right):\\ \;\;\;\;x + \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)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + 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}\;a \le -8.741731478203489932433786908162679076106 \cdot 10^{-201} \lor \neg \left(a \le 3.17759089387443058571350167291573822101 \cdot 10^{-128}\right):\\
\;\;\;\;x + \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)\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r102843 = x;
        double r102844 = y;
        double r102845 = z;
        double r102846 = r102844 - r102845;
        double r102847 = t;
        double r102848 = r102847 - r102843;
        double r102849 = a;
        double r102850 = r102849 - r102845;
        double r102851 = r102848 / r102850;
        double r102852 = r102846 * r102851;
        double r102853 = r102843 + r102852;
        return r102853;
}

double f(double x, double y, double z, double t, double a) {
        double r102854 = a;
        double r102855 = -8.74173147820349e-201;
        bool r102856 = r102854 <= r102855;
        double r102857 = 3.1775908938744306e-128;
        bool r102858 = r102854 <= r102857;
        double r102859 = !r102858;
        bool r102860 = r102856 || r102859;
        double r102861 = x;
        double r102862 = y;
        double r102863 = z;
        double r102864 = r102862 - r102863;
        double r102865 = cbrt(r102864);
        double r102866 = r102865 * r102865;
        double r102867 = r102854 - r102863;
        double r102868 = cbrt(r102867);
        double r102869 = r102866 / r102868;
        double r102870 = r102865 / r102868;
        double r102871 = t;
        double r102872 = r102871 - r102861;
        double r102873 = r102872 / r102868;
        double r102874 = r102870 * r102873;
        double r102875 = r102869 * r102874;
        double r102876 = r102861 + r102875;
        double r102877 = r102861 * r102862;
        double r102878 = r102877 / r102863;
        double r102879 = r102878 + r102871;
        double r102880 = r102871 * r102862;
        double r102881 = r102880 / r102863;
        double r102882 = r102879 - r102881;
        double r102883 = r102860 ? r102876 : r102882;
        return r102883;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if a < -8.74173147820349e-201 or 3.1775908938744306e-128 < a

    1. Initial program 12.5

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt13.0

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

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

      \[\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.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. Simplified10.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-cbrt10.6

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

      \[\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*10.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)}\]

    if -8.74173147820349e-201 < a < 3.1775908938744306e-128

    1. Initial program 23.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -8.741731478203489932433786908162679076106 \cdot 10^{-201} \lor \neg \left(a \le 3.17759089387443058571350167291573822101 \cdot 10^{-128}\right):\\ \;\;\;\;x + \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)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\ \end{array}\]

Reproduce

herbie shell --seed 2019322 
(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)))))