Average Error: 14.9 → 10.6
Time: 6.5s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -5.78394760799221384 \cdot 10^{-118} \lor \neg \left(a \le 3.53015522021268738 \cdot 10^{-230}\right):\\ \;\;\;\;x + \left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -5.78394760799221384 \cdot 10^{-118} \lor \neg \left(a \le 3.53015522021268738 \cdot 10^{-230}\right):\\
\;\;\;\;x + \left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r97726 = x;
        double r97727 = y;
        double r97728 = z;
        double r97729 = r97727 - r97728;
        double r97730 = t;
        double r97731 = r97730 - r97726;
        double r97732 = a;
        double r97733 = r97732 - r97728;
        double r97734 = r97731 / r97733;
        double r97735 = r97729 * r97734;
        double r97736 = r97726 + r97735;
        return r97736;
}

double f(double x, double y, double z, double t, double a) {
        double r97737 = a;
        double r97738 = -5.783947607992214e-118;
        bool r97739 = r97737 <= r97738;
        double r97740 = 3.5301552202126874e-230;
        bool r97741 = r97737 <= r97740;
        double r97742 = !r97741;
        bool r97743 = r97739 || r97742;
        double r97744 = x;
        double r97745 = y;
        double r97746 = z;
        double r97747 = r97745 - r97746;
        double r97748 = t;
        double r97749 = r97748 - r97744;
        double r97750 = cbrt(r97749);
        double r97751 = r97750 * r97750;
        double r97752 = r97737 - r97746;
        double r97753 = cbrt(r97752);
        double r97754 = r97753 * r97753;
        double r97755 = r97751 / r97754;
        double r97756 = cbrt(r97755);
        double r97757 = r97756 * r97756;
        double r97758 = r97747 * r97757;
        double r97759 = r97758 * r97756;
        double r97760 = r97750 / r97753;
        double r97761 = r97759 * r97760;
        double r97762 = r97744 + r97761;
        double r97763 = r97744 / r97746;
        double r97764 = r97748 / r97746;
        double r97765 = r97763 - r97764;
        double r97766 = r97745 * r97765;
        double r97767 = r97748 + r97766;
        double r97768 = r97743 ? r97762 : r97767;
        return r97768;
}

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 < -5.783947607992214e-118 or 3.5301552202126874e-230 < a

    1. Initial program 12.3

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

      \[\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 add-cube-cbrt12.9

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

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

      \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt10.1

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

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

    if -5.783947607992214e-118 < a < 3.5301552202126874e-230

    1. Initial program 25.5

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

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

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

      \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt20.6

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

      \[\leadsto x + \color{blue}{\left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)} \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\]
    10. Taylor expanded around inf 14.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -5.78394760799221384 \cdot 10^{-118} \lor \neg \left(a \le 3.53015522021268738 \cdot 10^{-230}\right):\\ \;\;\;\;x + \left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \end{array}\]

Reproduce

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