Average Error: 24.9 → 6.4
Time: 19.8s
Precision: 64
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.316506074405603897375801517730735446318 \cdot 10^{150}:\\ \;\;\;\;\left(-x\right) \cdot y\\ \mathbf{elif}\;z \le 4.846268586746066119279887145967959416994 \cdot 10^{79}:\\ \;\;\;\;\left(\left(\frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\right) \cdot \left(x \cdot y\right)\right) \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array}\]
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\begin{array}{l}
\mathbf{if}\;z \le -1.316506074405603897375801517730735446318 \cdot 10^{150}:\\
\;\;\;\;\left(-x\right) \cdot y\\

\mathbf{elif}\;z \le 4.846268586746066119279887145967959416994 \cdot 10^{79}:\\
\;\;\;\;\left(\left(\frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\right) \cdot \left(x \cdot y\right)\right) \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot y\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r18657216 = x;
        double r18657217 = y;
        double r18657218 = r18657216 * r18657217;
        double r18657219 = z;
        double r18657220 = r18657218 * r18657219;
        double r18657221 = r18657219 * r18657219;
        double r18657222 = t;
        double r18657223 = a;
        double r18657224 = r18657222 * r18657223;
        double r18657225 = r18657221 - r18657224;
        double r18657226 = sqrt(r18657225);
        double r18657227 = r18657220 / r18657226;
        return r18657227;
}

double f(double x, double y, double z, double t, double a) {
        double r18657228 = z;
        double r18657229 = -1.3165060744056039e+150;
        bool r18657230 = r18657228 <= r18657229;
        double r18657231 = x;
        double r18657232 = -r18657231;
        double r18657233 = y;
        double r18657234 = r18657232 * r18657233;
        double r18657235 = 4.846268586746066e+79;
        bool r18657236 = r18657228 <= r18657235;
        double r18657237 = cbrt(r18657228);
        double r18657238 = r18657228 * r18657228;
        double r18657239 = a;
        double r18657240 = t;
        double r18657241 = r18657239 * r18657240;
        double r18657242 = r18657238 - r18657241;
        double r18657243 = sqrt(r18657242);
        double r18657244 = cbrt(r18657243);
        double r18657245 = r18657237 / r18657244;
        double r18657246 = r18657245 * r18657245;
        double r18657247 = r18657231 * r18657233;
        double r18657248 = r18657246 * r18657247;
        double r18657249 = r18657248 * r18657245;
        double r18657250 = r18657236 ? r18657249 : r18657247;
        double r18657251 = r18657230 ? r18657234 : r18657250;
        return r18657251;
}

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.9
Target7.9
Herbie6.4
\[\begin{array}{l} \mathbf{if}\;z \lt -3.192130590385276419686361646843883646209 \cdot 10^{46}:\\ \;\;\;\;-y \cdot x\\ \mathbf{elif}\;z \lt 5.976268120920894210257945708950453212935 \cdot 10^{90}:\\ \;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if z < -1.3165060744056039e+150

    1. Initial program 52.5

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{1}} \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}}\]
    6. Simplified51.9

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)}\]
    10. Simplified1.2

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

    if -1.3165060744056039e+150 < z < 4.846268586746066e+79

    1. Initial program 11.4

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

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

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

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

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

      \[\leadsto \left(y \cdot x\right) \cdot \frac{z}{\color{blue}{\left(\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}\right) \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}}\]
    9. Applied add-cube-cbrt9.9

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

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

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

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

    if 4.846268586746066e+79 < z

    1. Initial program 41.0

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

      \[\leadsto \color{blue}{x \cdot y}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification6.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.316506074405603897375801517730735446318 \cdot 10^{150}:\\ \;\;\;\;\left(-x\right) \cdot y\\ \mathbf{elif}\;z \le 4.846268586746066119279887145967959416994 \cdot 10^{79}:\\ \;\;\;\;\left(\left(\frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\right) \cdot \left(x \cdot y\right)\right) \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array}\]

Reproduce

herbie shell --seed 2019179 
(FPCore (x y z t a)
  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"

  :herbie-target
  (if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))

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