Average Error: 14.9 → 6.5
Time: 26.8s
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.5496041168162683 \cdot 10^{-302}:\\ \;\;\;\;x + \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 0.0:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 5.459926311433972 \cdot 10^{-141}:\\ \;\;\;\;x + \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 3.694513290405539 \cdot 10^{+299}:\\ \;\;\;\;x + \frac{t - x}{a - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\\ \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.5496041168162683 \cdot 10^{-302}:\\
\;\;\;\;x + \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\\

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

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

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r3241594 = x;
        double r3241595 = y;
        double r3241596 = z;
        double r3241597 = r3241595 - r3241596;
        double r3241598 = t;
        double r3241599 = r3241598 - r3241594;
        double r3241600 = a;
        double r3241601 = r3241600 - r3241596;
        double r3241602 = r3241599 / r3241601;
        double r3241603 = r3241597 * r3241602;
        double r3241604 = r3241594 + r3241603;
        return r3241604;
}

double f(double x, double y, double z, double t, double a) {
        double r3241605 = x;
        double r3241606 = t;
        double r3241607 = r3241606 - r3241605;
        double r3241608 = a;
        double r3241609 = z;
        double r3241610 = r3241608 - r3241609;
        double r3241611 = r3241607 / r3241610;
        double r3241612 = y;
        double r3241613 = r3241612 - r3241609;
        double r3241614 = r3241611 * r3241613;
        double r3241615 = r3241605 + r3241614;
        double r3241616 = -1.5496041168162683e-302;
        bool r3241617 = r3241615 <= r3241616;
        double r3241618 = cbrt(r3241610);
        double r3241619 = cbrt(r3241618);
        double r3241620 = r3241607 / r3241619;
        double r3241621 = r3241613 / r3241618;
        double r3241622 = r3241621 / r3241618;
        double r3241623 = r3241618 * r3241618;
        double r3241624 = cbrt(r3241623);
        double r3241625 = r3241622 / r3241624;
        double r3241626 = r3241620 * r3241625;
        double r3241627 = r3241605 + r3241626;
        double r3241628 = 0.0;
        bool r3241629 = r3241615 <= r3241628;
        double r3241630 = r3241605 / r3241609;
        double r3241631 = r3241606 / r3241609;
        double r3241632 = r3241630 - r3241631;
        double r3241633 = r3241612 * r3241632;
        double r3241634 = r3241606 + r3241633;
        double r3241635 = 5.459926311433972e-141;
        bool r3241636 = r3241615 <= r3241635;
        double r3241637 = 1.0;
        double r3241638 = r3241637 / r3241610;
        double r3241639 = r3241613 * r3241607;
        double r3241640 = r3241638 * r3241639;
        double r3241641 = r3241605 + r3241640;
        double r3241642 = 3.694513290405539e+299;
        bool r3241643 = r3241615 <= r3241642;
        double r3241644 = r3241643 ? r3241615 : r3241627;
        double r3241645 = r3241636 ? r3241641 : r3241644;
        double r3241646 = r3241629 ? r3241634 : r3241645;
        double r3241647 = r3241617 ? r3241627 : r3241646;
        return r3241647;
}

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 4 regimes
  2. if (+ x (* (- y z) (/ (- t x) (- a z)))) < -1.5496041168162683e-302 or 3.694513290405539e+299 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 9.1

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt9.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-identity9.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-frac9.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*5.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. Simplified5.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 add-cube-cbrt5.8

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

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

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

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

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

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

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

    1. Initial program 61.5

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

      \[\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-frac61.1

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

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

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

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

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

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

    1. Initial program 26.2

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

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

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

    if 5.459926311433972e-141 < (+ x (* (- y z) (/ (- t x) (- a z)))) < 3.694513290405539e+299

    1. Initial program 3.1

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification6.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le -1.5496041168162683 \cdot 10^{-302}:\\ \;\;\;\;x + \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 0.0:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 5.459926311433972 \cdot 10^{-141}:\\ \;\;\;\;x + \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)\\ \mathbf{elif}\;x + \frac{t - x}{a - z} \cdot \left(y - z\right) \le 3.694513290405539 \cdot 10^{+299}:\\ \;\;\;\;x + \frac{t - x}{a - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\\ \end{array}\]

Reproduce

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