Average Error: 23.9 → 10.8
Time: 34.5s
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 r406599 = x;
        double r406600 = y;
        double r406601 = r406600 - r406599;
        double r406602 = z;
        double r406603 = t;
        double r406604 = r406602 - r406603;
        double r406605 = r406601 * r406604;
        double r406606 = a;
        double r406607 = r406606 - r406603;
        double r406608 = r406605 / r406607;
        double r406609 = r406599 + r406608;
        return r406609;
}

double f(double x, double y, double z, double t, double a) {
        double r406610 = a;
        double r406611 = -7.490233830340062e-237;
        bool r406612 = r406610 <= r406611;
        double r406613 = x;
        double r406614 = y;
        double r406615 = r406614 - r406613;
        double r406616 = z;
        double r406617 = t;
        double r406618 = r406616 - r406617;
        double r406619 = r406610 - r406617;
        double r406620 = r406618 / r406619;
        double r406621 = r406615 * r406620;
        double r406622 = r406613 + r406621;
        double r406623 = 3.5174369309382794e-112;
        bool r406624 = r406610 <= r406623;
        double r406625 = r406613 * r406616;
        double r406626 = r406625 / r406617;
        double r406627 = r406614 + r406626;
        double r406628 = r406616 * r406614;
        double r406629 = r406628 / r406617;
        double r406630 = r406627 - r406629;
        double r406631 = cbrt(r406615);
        double r406632 = r406631 * r406631;
        double r406633 = cbrt(r406619);
        double r406634 = r406633 * r406633;
        double r406635 = r406632 / r406634;
        double r406636 = r406633 / r406618;
        double r406637 = r406631 / r406636;
        double r406638 = r406635 * r406637;
        double r406639 = r406613 + r406638;
        double r406640 = r406624 ? r406630 : r406639;
        double r406641 = r406612 ? r406622 : r406640;
        return r406641;
}

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