Average Error: 15.0 → 11.1
Time: 32.1s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -1.317914642947996499854808142021174692446 \cdot 10^{-107}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{elif}\;a \le 1.510853063573210616754360888454383623335 \cdot 10^{-160}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -1.317914642947996499854808142021174692446 \cdot 10^{-107}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r118098 = x;
        double r118099 = y;
        double r118100 = z;
        double r118101 = r118099 - r118100;
        double r118102 = t;
        double r118103 = r118102 - r118098;
        double r118104 = a;
        double r118105 = r118104 - r118100;
        double r118106 = r118103 / r118105;
        double r118107 = r118101 * r118106;
        double r118108 = r118098 + r118107;
        return r118108;
}

double f(double x, double y, double z, double t, double a) {
        double r118109 = a;
        double r118110 = -1.3179146429479965e-107;
        bool r118111 = r118109 <= r118110;
        double r118112 = x;
        double r118113 = y;
        double r118114 = z;
        double r118115 = r118113 - r118114;
        double r118116 = r118109 - r118114;
        double r118117 = cbrt(r118116);
        double r118118 = r118117 * r118117;
        double r118119 = r118115 / r118118;
        double r118120 = t;
        double r118121 = r118120 - r118112;
        double r118122 = r118121 / r118117;
        double r118123 = r118119 * r118122;
        double r118124 = r118112 + r118123;
        double r118125 = 1.5108530635732106e-160;
        bool r118126 = r118109 <= r118125;
        double r118127 = r118112 * r118113;
        double r118128 = r118127 / r118114;
        double r118129 = r118128 + r118120;
        double r118130 = r118120 * r118113;
        double r118131 = r118130 / r118114;
        double r118132 = r118129 - r118131;
        double r118133 = cbrt(r118118);
        double r118134 = r118119 / r118133;
        double r118135 = cbrt(r118117);
        double r118136 = r118121 / r118135;
        double r118137 = r118134 * r118136;
        double r118138 = r118112 + r118137;
        double r118139 = r118126 ? r118132 : r118138;
        double r118140 = r118111 ? r118124 : r118139;
        return r118140;
}

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 a < -1.3179146429479965e-107

    1. Initial program 11.9

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

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

      \[\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-frac12.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*10.4

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

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

    if -1.3179146429479965e-107 < a < 1.5108530635732106e-160

    1. Initial program 25.8

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

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

    if 1.5108530635732106e-160 < a

    1. Initial program 11.2

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

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

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

      \[\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*9.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. Simplified9.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-cbrt9.7

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

      \[\leadsto x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\color{blue}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}}}\]
    11. Applied *-un-lft-identity9.7

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

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

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

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

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

Reproduce

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