Average Error: 23.9 → 10.8
Time: 32.6s
Precision: 64
\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\]
\[\begin{array}{l} \mathbf{if}\;a \le -7.49023383034006197850477955032889900172 \cdot 10^{-237}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \le 3.51743693093827941234487472362134671118 \cdot 10^{-112}:\\ \;\;\;\;\left(y + \frac{x \cdot z}{t}\right) - \frac{z \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \frac{\sqrt[3]{y - x}}{\frac{\sqrt[3]{a - t}}{z - t}}\\ \end{array}\]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\begin{array}{l}
\mathbf{if}\;a \le -7.49023383034006197850477955032889900172 \cdot 10^{-237}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a - t}\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r446456 = x;
        double r446457 = y;
        double r446458 = r446457 - r446456;
        double r446459 = z;
        double r446460 = t;
        double r446461 = r446459 - r446460;
        double r446462 = r446458 * r446461;
        double r446463 = a;
        double r446464 = r446463 - r446460;
        double r446465 = r446462 / r446464;
        double r446466 = r446456 + r446465;
        return r446466;
}

double f(double x, double y, double z, double t, double a) {
        double r446467 = a;
        double r446468 = -7.490233830340062e-237;
        bool r446469 = r446467 <= r446468;
        double r446470 = x;
        double r446471 = y;
        double r446472 = r446471 - r446470;
        double r446473 = z;
        double r446474 = t;
        double r446475 = r446473 - r446474;
        double r446476 = r446467 - r446474;
        double r446477 = r446475 / r446476;
        double r446478 = r446472 * r446477;
        double r446479 = r446470 + r446478;
        double r446480 = 3.5174369309382794e-112;
        bool r446481 = r446467 <= r446480;
        double r446482 = r446470 * r446473;
        double r446483 = r446482 / r446474;
        double r446484 = r446471 + r446483;
        double r446485 = r446473 * r446471;
        double r446486 = r446485 / r446474;
        double r446487 = r446484 - r446486;
        double r446488 = cbrt(r446472);
        double r446489 = r446488 * r446488;
        double r446490 = cbrt(r446476);
        double r446491 = r446490 * r446490;
        double r446492 = r446489 / r446491;
        double r446493 = r446490 / r446475;
        double r446494 = r446488 / r446493;
        double r446495 = r446492 * r446494;
        double r446496 = r446470 + r446495;
        double r446497 = r446481 ? r446487 : r446496;
        double r446498 = r446469 ? r446479 : r446497;
        return r446498;
}

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.9
Target9.4
Herbie10.8
\[\begin{array}{l} \mathbf{if}\;a \lt -1.615306284544257464183904494091872805513 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \lt 3.774403170083174201868024161554637965035 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if a < -7.490233830340062e-237

    1. Initial program 23.5

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity23.5

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

      \[\leadsto x + \color{blue}{\frac{y - x}{1} \cdot \frac{z - t}{a - t}}\]
    5. Simplified10.5

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

    if -7.490233830340062e-237 < a < 3.5174369309382794e-112

    1. Initial program 27.8

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

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

    if 3.5174369309382794e-112 < a

    1. Initial program 22.2

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

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity8.9

      \[\leadsto x + \frac{y - x}{\frac{a - t}{\color{blue}{1 \cdot \left(z - t\right)}}}\]
    6. Applied add-cube-cbrt9.5

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

      \[\leadsto x + \frac{y - x}{\color{blue}{\frac{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}{1} \cdot \frac{\sqrt[3]{a - t}}{z - t}}}\]
    8. Applied add-cube-cbrt9.6

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

      \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\frac{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}{1}} \cdot \frac{\sqrt[3]{y - x}}{\frac{\sqrt[3]{a - t}}{z - t}}}\]
    10. Simplified9.3

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

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

Reproduce

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

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t))))))

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