Average Error: 15.0 → 9.2
Time: 38.1s
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 \frac{-3284809718806757}{2.323463919496536035621972653359219625205 \cdot 10^{282}} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \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 \frac{-3284809718806757}{2.323463919496536035621972653359219625205 \cdot 10^{282}} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r148433 = x;
        double r148434 = y;
        double r148435 = z;
        double r148436 = r148434 - r148435;
        double r148437 = t;
        double r148438 = r148437 - r148433;
        double r148439 = a;
        double r148440 = r148439 - r148435;
        double r148441 = r148438 / r148440;
        double r148442 = r148436 * r148441;
        double r148443 = r148433 + r148442;
        return r148443;
}

double f(double x, double y, double z, double t, double a) {
        double r148444 = x;
        double r148445 = y;
        double r148446 = z;
        double r148447 = r148445 - r148446;
        double r148448 = t;
        double r148449 = r148448 - r148444;
        double r148450 = a;
        double r148451 = r148450 - r148446;
        double r148452 = r148449 / r148451;
        double r148453 = r148447 * r148452;
        double r148454 = r148444 + r148453;
        double r148455 = -3284809718806757.0;
        double r148456 = 2.323463919496536e+282;
        double r148457 = r148455 / r148456;
        bool r148458 = r148454 <= r148457;
        double r148459 = 0.0;
        bool r148460 = r148454 <= r148459;
        double r148461 = !r148460;
        bool r148462 = r148458 || r148461;
        double r148463 = r148444 / r148446;
        double r148464 = r148448 / r148446;
        double r148465 = r148463 - r148464;
        double r148466 = r148445 * r148465;
        double r148467 = r148466 + r148448;
        double r148468 = r148462 ? r148454 : r148467;
        return r148468;
}

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)))) < -1.4137554240646577e-267 or 0.0 < (+ 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.7

      \[\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}}}\]

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

    1. Initial program 60.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le \frac{-3284809718806757}{2.323463919496536035621972653359219625205 \cdot 10^{282}} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \le 0.0\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \end{array}\]

Reproduce

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