Average Error: 14.7 → 6.9
Time: 22.5s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le -1.3435650229451346 \cdot 10^{-276}:\\ \;\;\;\;x + \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}} \cdot \frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}}}\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 0.0:\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} + x\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le -1.3435650229451346 \cdot 10^{-276}:\\
\;\;\;\;x + \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}} \cdot \frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}}}\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r7240726 = x;
        double r7240727 = y;
        double r7240728 = z;
        double r7240729 = r7240727 - r7240728;
        double r7240730 = t;
        double r7240731 = r7240730 - r7240726;
        double r7240732 = a;
        double r7240733 = r7240732 - r7240728;
        double r7240734 = r7240731 / r7240733;
        double r7240735 = r7240729 * r7240734;
        double r7240736 = r7240726 + r7240735;
        return r7240736;
}

double f(double x, double y, double z, double t, double a) {
        double r7240737 = x;
        double r7240738 = t;
        double r7240739 = r7240738 - r7240737;
        double r7240740 = a;
        double r7240741 = z;
        double r7240742 = r7240740 - r7240741;
        double r7240743 = r7240739 / r7240742;
        double r7240744 = y;
        double r7240745 = r7240744 - r7240741;
        double r7240746 = r7240743 * r7240745;
        double r7240747 = r7240737 + r7240746;
        double r7240748 = -1.3435650229451346e-276;
        bool r7240749 = r7240747 <= r7240748;
        double r7240750 = cbrt(r7240739);
        double r7240751 = cbrt(r7240742);
        double r7240752 = r7240750 / r7240751;
        double r7240753 = r7240751 / r7240750;
        double r7240754 = r7240753 * r7240753;
        double r7240755 = r7240745 / r7240754;
        double r7240756 = r7240752 * r7240755;
        double r7240757 = r7240737 + r7240756;
        double r7240758 = 0.0;
        bool r7240759 = r7240747 <= r7240758;
        double r7240760 = r7240737 / r7240741;
        double r7240761 = r7240738 / r7240741;
        double r7240762 = r7240760 - r7240761;
        double r7240763 = r7240744 * r7240762;
        double r7240764 = r7240763 + r7240738;
        double r7240765 = r7240739 / r7240751;
        double r7240766 = r7240751 * r7240751;
        double r7240767 = r7240745 / r7240766;
        double r7240768 = r7240765 * r7240767;
        double r7240769 = r7240768 + r7240737;
        double r7240770 = r7240759 ? r7240764 : r7240769;
        double r7240771 = r7240749 ? r7240757 : r7240770;
        return r7240771;
}

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 3 regimes
  2. if (+ x (* (- y z) (/ (- t x) (- a z)))) < -1.3435650229451346e-276

    1. Initial program 6.9

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

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

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

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

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

      \[\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 *-un-lft-identity5.0

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

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

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

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

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

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

    if -1.3435650229451346e-276 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 0.0

    1. Initial program 60.6

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

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

      \[\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-frac60.4

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

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

      \[\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 *-un-lft-identity59.3

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}} \cdot \frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}}}} \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\]
    15. Taylor expanded around inf 24.7

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

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

    if 0.0 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 7.1

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

      \[\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-frac7.8

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

      \[\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. Simplified4.8

      \[\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 *-commutative4.8

      \[\leadsto x + \color{blue}{\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification6.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le -1.3435650229451346 \cdot 10^{-276}:\\ \;\;\;\;x + \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}} \cdot \frac{\sqrt[3]{a - z}}{\sqrt[3]{t - x}}}\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 0.0:\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} + x\\ \end{array}\]

Reproduce

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