Average Error: 14.8 → 7.6
Time: 39.4s
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 -6.867553293775607 \cdot 10^{-231}:\\ \;\;\;\;\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + 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{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\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 -6.867553293775607 \cdot 10^{-231}:\\
\;\;\;\;\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + 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{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}} + x\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r7448316 = x;
        double r7448317 = y;
        double r7448318 = z;
        double r7448319 = r7448317 - r7448318;
        double r7448320 = t;
        double r7448321 = r7448320 - r7448316;
        double r7448322 = a;
        double r7448323 = r7448322 - r7448318;
        double r7448324 = r7448321 / r7448323;
        double r7448325 = r7448319 * r7448324;
        double r7448326 = r7448316 + r7448325;
        return r7448326;
}

double f(double x, double y, double z, double t, double a) {
        double r7448327 = x;
        double r7448328 = t;
        double r7448329 = r7448328 - r7448327;
        double r7448330 = a;
        double r7448331 = z;
        double r7448332 = r7448330 - r7448331;
        double r7448333 = r7448329 / r7448332;
        double r7448334 = y;
        double r7448335 = r7448334 - r7448331;
        double r7448336 = r7448333 * r7448335;
        double r7448337 = r7448327 + r7448336;
        double r7448338 = -6.867553293775607e-231;
        bool r7448339 = r7448337 <= r7448338;
        double r7448340 = cbrt(r7448332);
        double r7448341 = r7448340 * r7448340;
        double r7448342 = r7448335 / r7448341;
        double r7448343 = r7448329 / r7448340;
        double r7448344 = r7448342 * r7448343;
        double r7448345 = r7448344 + r7448327;
        double r7448346 = 0.0;
        bool r7448347 = r7448337 <= r7448346;
        double r7448348 = r7448327 / r7448331;
        double r7448349 = r7448328 / r7448331;
        double r7448350 = r7448348 - r7448349;
        double r7448351 = r7448334 * r7448350;
        double r7448352 = r7448351 + r7448328;
        double r7448353 = r7448347 ? r7448352 : r7448345;
        double r7448354 = r7448339 ? r7448345 : r7448353;
        return r7448354;
}

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)))) < -6.867553293775607e-231 or 0.0 < (+ x (* (- y z) (/ (- t x) (- a z))))

    1. Initial program 7.0

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

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

    1. Initial program 57.7

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

      \[\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*54.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. Simplified54.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 add-cube-cbrt54.3

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

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

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

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

Reproduce

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