Average Error: 23.9 → 10.3
Time: 6.6s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -4.970659471181176 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{elif}\;a \le 6.3482844027424845 \cdot 10^{-147}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \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}\;a \le -4.970659471181176 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\

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

\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 r595581 = x;
        double r595582 = y;
        double r595583 = z;
        double r595584 = r595582 - r595583;
        double r595585 = t;
        double r595586 = r595585 - r595581;
        double r595587 = r595584 * r595586;
        double r595588 = a;
        double r595589 = r595588 - r595583;
        double r595590 = r595587 / r595589;
        double r595591 = r595581 + r595590;
        return r595591;
}

double f(double x, double y, double z, double t, double a) {
        double r595592 = a;
        double r595593 = -4.970659471181176e-89;
        bool r595594 = r595592 <= r595593;
        double r595595 = x;
        double r595596 = y;
        double r595597 = z;
        double r595598 = r595596 - r595597;
        double r595599 = r595592 - r595597;
        double r595600 = cbrt(r595599);
        double r595601 = r595600 * r595600;
        double r595602 = r595598 / r595601;
        double r595603 = t;
        double r595604 = r595603 - r595595;
        double r595605 = r595604 / r595600;
        double r595606 = r595602 * r595605;
        double r595607 = r595595 + r595606;
        double r595608 = 6.348284402742484e-147;
        bool r595609 = r595592 <= r595608;
        double r595610 = r595595 / r595597;
        double r595611 = r595603 / r595597;
        double r595612 = r595610 - r595611;
        double r595613 = r595596 * r595612;
        double r595614 = r595603 + r595613;
        double r595615 = cbrt(r595604);
        double r595616 = r595615 * r595615;
        double r595617 = cbrt(r595601);
        double r595618 = r595616 / r595617;
        double r595619 = r595602 * r595618;
        double r595620 = cbrt(r595600);
        double r595621 = r595615 / r595620;
        double r595622 = r595619 * r595621;
        double r595623 = r595595 + r595622;
        double r595624 = r595609 ? r595614 : r595623;
        double r595625 = r595594 ? r595607 : r595624;
        return r595625;
}

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
Target11.8
Herbie10.3
\[\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 3 regimes
  2. if a < -4.970659471181176e-89

    1. Initial program 22.1

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

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

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

    if -4.970659471181176e-89 < a < 6.348284402742484e-147

    1. Initial program 27.8

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

      \[\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-frac20.1

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

      \[\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-prod20.3

      \[\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-cbrt20.4

      \[\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-frac20.4

      \[\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*19.2

      \[\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}}}}\]
    11. Using strategy rm
    12. Applied add-sqr-sqrt19.2

      \[\leadsto 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}}{\color{blue}{\sqrt{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \sqrt{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z}}}\]
    13. Applied times-frac19.2

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

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

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

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

    if 6.348284402742484e-147 < a

    1. Initial program 22.8

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

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

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

      \[\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-prod10.3

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

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

      \[\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*10.0

      \[\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 3 regimes into one program.
  4. Final simplification10.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -4.970659471181176 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \mathbf{elif}\;a \le 6.3482844027424845 \cdot 10^{-147}:\\ \;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ \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 2020064 
(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))))