Average Error: 25.2 → 9.9
Time: 7.3s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.1570424479962861 \cdot 10^{206} \lor \neg \left(z \le 9.13381405929909946 \cdot 10^{219}\right):\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z}}}\\ \end{array}\]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
\mathbf{if}\;z \le -1.1570424479962861 \cdot 10^{206} \lor \neg \left(z \le 9.13381405929909946 \cdot 10^{219}\right):\\
\;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r1182419 = x;
        double r1182420 = y;
        double r1182421 = z;
        double r1182422 = r1182420 - r1182421;
        double r1182423 = t;
        double r1182424 = r1182423 - r1182419;
        double r1182425 = r1182422 * r1182424;
        double r1182426 = a;
        double r1182427 = r1182426 - r1182421;
        double r1182428 = r1182425 / r1182427;
        double r1182429 = r1182419 + r1182428;
        return r1182429;
}

double f(double x, double y, double z, double t, double a) {
        double r1182430 = z;
        double r1182431 = -1.1570424479962861e+206;
        bool r1182432 = r1182430 <= r1182431;
        double r1182433 = 9.1338140592991e+219;
        bool r1182434 = r1182430 <= r1182433;
        double r1182435 = !r1182434;
        bool r1182436 = r1182432 || r1182435;
        double r1182437 = y;
        double r1182438 = x;
        double r1182439 = r1182438 / r1182430;
        double r1182440 = t;
        double r1182441 = r1182440 / r1182430;
        double r1182442 = r1182439 - r1182441;
        double r1182443 = r1182437 * r1182442;
        double r1182444 = r1182443 + r1182440;
        double r1182445 = r1182437 - r1182430;
        double r1182446 = a;
        double r1182447 = r1182446 - r1182430;
        double r1182448 = cbrt(r1182447);
        double r1182449 = r1182448 * r1182448;
        double r1182450 = r1182445 / r1182449;
        double r1182451 = r1182440 - r1182438;
        double r1182452 = cbrt(r1182451);
        double r1182453 = r1182452 * r1182452;
        double r1182454 = cbrt(r1182449);
        double r1182455 = r1182453 / r1182454;
        double r1182456 = r1182450 * r1182455;
        double r1182457 = cbrt(r1182448);
        double r1182458 = r1182452 / r1182457;
        double r1182459 = r1182456 * r1182458;
        double r1182460 = r1182438 + r1182459;
        double r1182461 = r1182436 ? r1182444 : r1182460;
        return r1182461;
}

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

Target

Original25.2
Target11.8
Herbie9.9
\[\begin{array}{l} \mathbf{if}\;z \lt -1.25361310560950359 \cdot 10^{188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \lt 4.44670236911381103 \cdot 10^{64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if z < -1.1570424479962861e+206 or 9.1338140592991e+219 < z

    1. Initial program 51.7

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

      \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}\]
    4. Applied times-frac27.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}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt27.2

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

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

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

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

    if -1.1570424479962861e+206 < z < 9.1338140592991e+219

    1. Initial program 19.4

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

      \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}\]
    4. Applied times-frac9.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}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt9.9

      \[\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}}}}\]
    7. Applied cbrt-prod9.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}}}}\]
    8. Applied add-cube-cbrt10.1

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.1570424479962861 \cdot 10^{206} \lor \neg \left(z \le 9.13381405929909946 \cdot 10^{219}\right):\\ \;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020065 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))