\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -3.385971485995102879568847063302767488866 \cdot 10^{103}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 7.130903565650380636895506727956454500124 \cdot 10^{148}:\\
\;\;\;\;\frac{x}{\frac{\sqrt[3]{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}{y}} \cdot \frac{1}{\sqrt[3]{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot \sqrt[3]{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r174069 = x;
double r174070 = y;
double r174071 = r174069 * r174070;
double r174072 = z;
double r174073 = r174071 * r174072;
double r174074 = r174072 * r174072;
double r174075 = t;
double r174076 = a;
double r174077 = r174075 * r174076;
double r174078 = r174074 - r174077;
double r174079 = sqrt(r174078);
double r174080 = r174073 / r174079;
return r174080;
}
double f(double x, double y, double z, double t, double a) {
double r174081 = z;
double r174082 = -3.385971485995103e+103;
bool r174083 = r174081 <= r174082;
double r174084 = x;
double r174085 = y;
double r174086 = r174084 * r174085;
double r174087 = -r174086;
double r174088 = 7.130903565650381e+148;
bool r174089 = r174081 <= r174088;
double r174090 = r174081 * r174081;
double r174091 = t;
double r174092 = a;
double r174093 = r174091 * r174092;
double r174094 = r174090 - r174093;
double r174095 = sqrt(r174094);
double r174096 = r174095 / r174081;
double r174097 = cbrt(r174096);
double r174098 = r174097 / r174085;
double r174099 = r174084 / r174098;
double r174100 = 1.0;
double r174101 = r174097 * r174097;
double r174102 = r174100 / r174101;
double r174103 = r174099 * r174102;
double r174104 = r174089 ? r174103 : r174086;
double r174105 = r174083 ? r174087 : r174104;
return r174105;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.7 |
|---|---|
| Target | 8.1 |
| Herbie | 6.6 |
if z < -3.385971485995103e+103Initial program 43.7
Simplified44.0
rmApplied clear-num44.0
Simplified41.3
Taylor expanded around -inf 2.2
Simplified2.2
if -3.385971485995103e+103 < z < 7.130903565650381e+148Initial program 11.6
Simplified10.9
rmApplied clear-num11.1
Simplified9.6
rmApplied *-un-lft-identity9.6
Applied add-cube-cbrt9.8
Applied times-frac9.8
Applied *-un-lft-identity9.8
Applied times-frac9.7
Applied associate-*l*9.5
Simplified9.5
if 7.130903565650381e+148 < z Initial program 53.6
Simplified53.8
Taylor expanded around inf 1.5
Final simplification6.6
herbie shell --seed 2019174 +o rules:numerics
(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)))))