Average Error: 23.3 → 8.8
Time: 25.3s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} = -\infty:\\ \;\;\;\;\frac{y - z}{\frac{a - z}{t - x}} + x\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -1.3052930342825135 \cdot 10^{-258}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 0.0:\\ \;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\left(\left(\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}\right) \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \end{array}\]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} = -\infty:\\
\;\;\;\;\frac{y - z}{\frac{a - z}{t - x}} + x\\

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

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r31280452 = x;
        double r31280453 = y;
        double r31280454 = z;
        double r31280455 = r31280453 - r31280454;
        double r31280456 = t;
        double r31280457 = r31280456 - r31280452;
        double r31280458 = r31280455 * r31280457;
        double r31280459 = a;
        double r31280460 = r31280459 - r31280454;
        double r31280461 = r31280458 / r31280460;
        double r31280462 = r31280452 + r31280461;
        return r31280462;
}

double f(double x, double y, double z, double t, double a) {
        double r31280463 = x;
        double r31280464 = y;
        double r31280465 = z;
        double r31280466 = r31280464 - r31280465;
        double r31280467 = t;
        double r31280468 = r31280467 - r31280463;
        double r31280469 = r31280466 * r31280468;
        double r31280470 = a;
        double r31280471 = r31280470 - r31280465;
        double r31280472 = r31280469 / r31280471;
        double r31280473 = r31280463 + r31280472;
        double r31280474 = -inf.0;
        bool r31280475 = r31280473 <= r31280474;
        double r31280476 = r31280471 / r31280468;
        double r31280477 = r31280466 / r31280476;
        double r31280478 = r31280477 + r31280463;
        double r31280479 = -1.3052930342825135e-258;
        bool r31280480 = r31280473 <= r31280479;
        double r31280481 = 0.0;
        bool r31280482 = r31280473 <= r31280481;
        double r31280483 = r31280463 * r31280464;
        double r31280484 = r31280483 / r31280465;
        double r31280485 = r31280467 + r31280484;
        double r31280486 = r31280464 * r31280467;
        double r31280487 = r31280486 / r31280465;
        double r31280488 = r31280485 - r31280487;
        double r31280489 = cbrt(r31280471);
        double r31280490 = cbrt(r31280489);
        double r31280491 = r31280490 * r31280490;
        double r31280492 = r31280491 * r31280489;
        double r31280493 = r31280492 * r31280490;
        double r31280494 = r31280466 / r31280493;
        double r31280495 = r31280468 / r31280489;
        double r31280496 = r31280494 * r31280495;
        double r31280497 = r31280463 + r31280496;
        double r31280498 = r31280482 ? r31280488 : r31280497;
        double r31280499 = r31280480 ? r31280473 : r31280498;
        double r31280500 = r31280475 ? r31280478 : r31280499;
        return r31280500;
}

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

Original23.3
Target11.8
Herbie8.8
\[\begin{array}{l} \mathbf{if}\;z \lt -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \lt 4.446702369113811 \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 4 regimes
  2. if (+ x (/ (* (- y z) (- t x)) (- a z))) < -inf.0

    1. Initial program 60.8

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
    2. Using strategy rm
    3. Applied associate-/l*16.8

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}}\]

    if -inf.0 < (+ x (/ (* (- y z) (- t x)) (- a z))) < -1.3052930342825135e-258

    1. Initial program 2.2

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

      \[\leadsto x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\color{blue}{\left(\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}\right) \cdot \sqrt[3]{\sqrt[3]{a - z}}}}\]
    7. Using strategy rm
    8. Applied frac-times3.1

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

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

    if -1.3052930342825135e-258 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 0.0

    1. Initial program 57.6

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

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

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

    1. Initial program 20.3

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

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

      \[\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-cbrt8.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} = -\infty:\\ \;\;\;\;\frac{y - z}{\frac{a - z}{t - x}} + x\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -1.3052930342825135 \cdot 10^{-258}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 0.0:\\ \;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\left(\left(\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}\right) \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \end{array}\]

Reproduce

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

  :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))))