Average Error: 14.9 → 10.9
Time: 18.7s
Precision: 64
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -1.1793629130618792 \cdot 10^{-222} \lor \neg \left(a \le 4.544162639495625 \cdot 10^{-92}\right):\\ \;\;\;\;x + \left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\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}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \end{array}\]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -1.1793629130618792 \cdot 10^{-222} \lor \neg \left(a \le 4.544162639495625 \cdot 10^{-92}\right):\\
\;\;\;\;x + \left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\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}}\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r257186 = x;
        double r257187 = y;
        double r257188 = z;
        double r257189 = r257187 - r257188;
        double r257190 = t;
        double r257191 = r257190 - r257186;
        double r257192 = a;
        double r257193 = r257192 - r257188;
        double r257194 = r257191 / r257193;
        double r257195 = r257189 * r257194;
        double r257196 = r257186 + r257195;
        return r257196;
}

double f(double x, double y, double z, double t, double a) {
        double r257197 = a;
        double r257198 = -1.1793629130618792e-222;
        bool r257199 = r257197 <= r257198;
        double r257200 = 4.544162639495625e-92;
        bool r257201 = r257197 <= r257200;
        double r257202 = !r257201;
        bool r257203 = r257199 || r257202;
        double r257204 = x;
        double r257205 = y;
        double r257206 = z;
        double r257207 = r257205 - r257206;
        double r257208 = t;
        double r257209 = r257208 - r257204;
        double r257210 = cbrt(r257209);
        double r257211 = r257210 * r257210;
        double r257212 = r257197 - r257206;
        double r257213 = cbrt(r257212);
        double r257214 = r257213 * r257213;
        double r257215 = r257211 / r257214;
        double r257216 = cbrt(r257215);
        double r257217 = r257216 * r257216;
        double r257218 = r257207 * r257217;
        double r257219 = r257218 * r257216;
        double r257220 = r257210 / r257213;
        double r257221 = r257219 * r257220;
        double r257222 = r257204 + r257221;
        double r257223 = r257204 / r257206;
        double r257224 = r257208 / r257206;
        double r257225 = r257223 - r257224;
        double r257226 = r257205 * r257225;
        double r257227 = r257208 + r257226;
        double r257228 = r257203 ? r257222 : r257227;
        return r257228;
}

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 a < -1.1793629130618792e-222 or 4.544162639495625e-92 < a

    1. Initial program 12.1

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

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

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

      \[\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. Using strategy rm
    8. Applied add-cube-cbrt10.4

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

      \[\leadsto x + \color{blue}{\left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\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.1793629130618792e-222 < a < 4.544162639495625e-92

    1. Initial program 25.7

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

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

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

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

      \[\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. Using strategy rm
    8. Applied add-cube-cbrt20.8

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

      \[\leadsto x + \color{blue}{\left(\left(\left(y - z\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right)\right) \cdot \sqrt[3]{\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}}\]
    10. Taylor expanded around inf 14.9

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

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

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

Reproduce

herbie shell --seed 2020043 +o rules:numerics
(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)))))