Average Error: 14.9 → 10.8
Time: 25.3s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -1.399757727683263320055919595683189303096 \cdot 10^{-152}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \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)\\ \mathbf{elif}\;a \le 2.218580369880817958408950099979740625957 \cdot 10^{-191}:\\ \;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \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)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -1.399757727683263320055919595683189303096 \cdot 10^{-152}:\\
\;\;\;\;x + \frac{\sqrt[3]{y - z} \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)\\

\mathbf{elif}\;a \le 2.218580369880817958408950099979740625957 \cdot 10^{-191}:\\
\;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{\sqrt[3]{y - z} \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)\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r6246949 = x;
        double r6246950 = y;
        double r6246951 = z;
        double r6246952 = r6246950 - r6246951;
        double r6246953 = t;
        double r6246954 = r6246953 - r6246949;
        double r6246955 = a;
        double r6246956 = r6246955 - r6246951;
        double r6246957 = r6246954 / r6246956;
        double r6246958 = r6246952 * r6246957;
        double r6246959 = r6246949 + r6246958;
        return r6246959;
}

double f(double x, double y, double z, double t, double a) {
        double r6246960 = a;
        double r6246961 = -1.3997577276832633e-152;
        bool r6246962 = r6246960 <= r6246961;
        double r6246963 = x;
        double r6246964 = y;
        double r6246965 = z;
        double r6246966 = r6246964 - r6246965;
        double r6246967 = cbrt(r6246966);
        double r6246968 = r6246967 * r6246967;
        double r6246969 = r6246960 - r6246965;
        double r6246970 = cbrt(r6246969);
        double r6246971 = r6246968 / r6246970;
        double r6246972 = t;
        double r6246973 = r6246972 - r6246963;
        double r6246974 = r6246973 / r6246970;
        double r6246975 = r6246967 / r6246970;
        double r6246976 = r6246974 * r6246975;
        double r6246977 = r6246971 * r6246976;
        double r6246978 = r6246963 + r6246977;
        double r6246979 = 2.218580369880818e-191;
        bool r6246980 = r6246960 <= r6246979;
        double r6246981 = r6246963 * r6246964;
        double r6246982 = r6246981 / r6246965;
        double r6246983 = r6246972 + r6246982;
        double r6246984 = r6246964 * r6246972;
        double r6246985 = r6246984 / r6246965;
        double r6246986 = r6246983 - r6246985;
        double r6246987 = r6246980 ? r6246986 : r6246978;
        double r6246988 = r6246962 ? r6246978 : r6246987;
        return r6246988;
}

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 < -1.3997577276832633e-152 or 2.218580369880818e-191 < a

    1. Initial program 12.4

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

      \[\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-identity12.9

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

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

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

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

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

      \[\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 -1.3997577276832633e-152 < a < 2.218580369880818e-191

    1. Initial program 25.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -1.399757727683263320055919595683189303096 \cdot 10^{-152}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \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)\\ \mathbf{elif}\;a \le 2.218580369880817958408950099979740625957 \cdot 10^{-191}:\\ \;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \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)\\ \end{array}\]

Reproduce

herbie shell --seed 2019171 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  (+ x (* (- y z) (/ (- t x) (- a z)))))