Average Error: 14.5 → 7.7
Time: 6.0s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le -3.46481173776856212 \cdot 10^{-305} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 1.62932563536714997 \cdot 10^{-299}\right):\\ \;\;\;\;x + \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]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}}\\ \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}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le -3.46481173776856212 \cdot 10^{-305} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 1.62932563536714997 \cdot 10^{-299}\right):\\
\;\;\;\;x + \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]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}}\\

\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 r140693 = x;
        double r140694 = y;
        double r140695 = z;
        double r140696 = r140694 - r140695;
        double r140697 = t;
        double r140698 = r140697 - r140693;
        double r140699 = a;
        double r140700 = r140699 - r140695;
        double r140701 = r140698 / r140700;
        double r140702 = r140696 * r140701;
        double r140703 = r140693 + r140702;
        return r140703;
}

double f(double x, double y, double z, double t, double a) {
        double r140704 = x;
        double r140705 = y;
        double r140706 = z;
        double r140707 = r140705 - r140706;
        double r140708 = t;
        double r140709 = r140708 - r140704;
        double r140710 = a;
        double r140711 = r140710 - r140706;
        double r140712 = r140709 / r140711;
        double r140713 = r140707 * r140712;
        double r140714 = r140704 + r140713;
        double r140715 = -3.464811737768562e-305;
        bool r140716 = r140714 <= r140715;
        double r140717 = 1.62932563536715e-299;
        bool r140718 = r140714 <= r140717;
        double r140719 = !r140718;
        bool r140720 = r140716 || r140719;
        double r140721 = cbrt(r140709);
        double r140722 = r140721 * r140721;
        double r140723 = cbrt(r140711);
        double r140724 = r140723 * r140723;
        double r140725 = r140722 / r140724;
        double r140726 = r140707 * r140725;
        double r140727 = cbrt(r140724);
        double r140728 = cbrt(r140723);
        double r140729 = r140727 * r140728;
        double r140730 = r140721 / r140729;
        double r140731 = r140726 * r140730;
        double r140732 = r140704 + r140731;
        double r140733 = r140704 * r140705;
        double r140734 = r140733 / r140706;
        double r140735 = r140734 + r140708;
        double r140736 = r140708 * r140705;
        double r140737 = r140736 / r140706;
        double r140738 = r140735 - r140737;
        double r140739 = r140720 ? r140732 : r140738;
        return r140739;
}

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 (+ x (* (- y z) (/ (- t x) (- a z)))) < -3.464811737768562e-305 or 1.62932563536715e-299 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 7.4

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

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

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

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

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

      \[\leadsto x + \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]{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}}\]
    9. Applied cbrt-prod5.0

      \[\leadsto x + \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}}{\color{blue}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}}}\]

    if -3.464811737768562e-305 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 1.62932563536715e-299

    1. Initial program 61.4

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

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

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

Reproduce

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