Average Error: 24.1 → 10.0
Time: 26.5s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -6.16213479572799396537678486310634204319 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}\right)\\ \mathbf{elif}\;a \le 3.08635240287905078638271475344473661072 \cdot 10^{-58}:\\ \;\;\;\;\left(\frac{x}{z} - \frac{t}{z}\right) \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right)} \cdot \frac{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}\;a \le -6.16213479572799396537678486310634204319 \cdot 10^{-127}:\\
\;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}\right)\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r32406326 = x;
        double r32406327 = y;
        double r32406328 = z;
        double r32406329 = r32406327 - r32406328;
        double r32406330 = t;
        double r32406331 = r32406330 - r32406326;
        double r32406332 = r32406329 * r32406331;
        double r32406333 = a;
        double r32406334 = r32406333 - r32406328;
        double r32406335 = r32406332 / r32406334;
        double r32406336 = r32406326 + r32406335;
        return r32406336;
}

double f(double x, double y, double z, double t, double a) {
        double r32406337 = a;
        double r32406338 = -6.162134795727994e-127;
        bool r32406339 = r32406337 <= r32406338;
        double r32406340 = x;
        double r32406341 = y;
        double r32406342 = z;
        double r32406343 = r32406341 - r32406342;
        double r32406344 = cbrt(r32406343);
        double r32406345 = r32406344 * r32406344;
        double r32406346 = r32406337 - r32406342;
        double r32406347 = cbrt(r32406346);
        double r32406348 = r32406345 / r32406347;
        double r32406349 = t;
        double r32406350 = r32406349 - r32406340;
        double r32406351 = r32406350 / r32406347;
        double r32406352 = r32406344 / r32406347;
        double r32406353 = r32406351 * r32406352;
        double r32406354 = r32406348 * r32406353;
        double r32406355 = r32406340 + r32406354;
        double r32406356 = 3.0863524028790508e-58;
        bool r32406357 = r32406337 <= r32406356;
        double r32406358 = r32406340 / r32406342;
        double r32406359 = r32406349 / r32406342;
        double r32406360 = r32406358 - r32406359;
        double r32406361 = r32406360 * r32406341;
        double r32406362 = r32406361 + r32406349;
        double r32406363 = r32406347 * r32406347;
        double r32406364 = cbrt(r32406363);
        double r32406365 = r32406364 * r32406363;
        double r32406366 = r32406343 / r32406365;
        double r32406367 = cbrt(r32406347);
        double r32406368 = r32406350 / r32406367;
        double r32406369 = r32406366 * r32406368;
        double r32406370 = r32406340 + r32406369;
        double r32406371 = r32406357 ? r32406362 : r32406370;
        double r32406372 = r32406339 ? r32406355 : r32406371;
        return r32406372;
}

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

Original24.1
Target11.9
Herbie10.0
\[\begin{array}{l} \mathbf{if}\;z \lt -1.253613105609503593846459977496550767343 \cdot 10^{188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \lt 4.446702369113811028051510715777703865332 \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 3 regimes
  2. if a < -6.162134795727994e-127

    1. Initial program 21.5

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

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

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

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

    if -6.162134795727994e-127 < a < 3.0863524028790508e-58

    1. Initial program 29.0

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

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

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

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

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

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

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

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

    if 3.0863524028790508e-58 < a

    1. Initial program 22.2

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

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

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

      \[\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 *-un-lft-identity8.7

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

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

      \[\leadsto x + \color{blue}{\left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{1}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}}\]
    11. Simplified8.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -6.16213479572799396537678486310634204319 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{t - x}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}\right)\\ \mathbf{elif}\;a \le 3.08635240287905078638271475344473661072 \cdot 10^{-58}:\\ \;\;\;\;\left(\frac{x}{z} - \frac{t}{z}\right) \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right)} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\\ \end{array}\]

Reproduce

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