\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\begin{array}{l}
\mathbf{if}\;t \leq -7.112241749727716 \cdot 10^{-59} \lor \neg \left(t \leq -9.466108571856053 \cdot 10^{-300}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{y}{{z}^{y}}} \cdot \frac{\sqrt[3]{x}}{\frac{e^{b}}{{a}^{\left(t - 1\right)}}}\\
\end{array}(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -7.112241749727716e-59) (not (<= t -9.466108571856053e-300)))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y)
(*
(/ (* (cbrt x) (cbrt x)) (/ y (pow z y)))
(/ (cbrt x) (/ (exp b) (pow a (- t 1.0)))))))double code(double x, double y, double z, double t, double a, double b) {
return (x * exp(((y * log(z)) + ((t - 1.0) * log(a))) - b)) / y;
}
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.112241749727716e-59) || !(t <= -9.466108571856053e-300)) {
tmp = (x * exp(((y * log(z)) + ((t - 1.0) * log(a))) - b)) / y;
} else {
tmp = ((cbrt(x) * cbrt(x)) / (y / pow(z, y))) * (cbrt(x) / (exp(b) / pow(a, (t - 1.0))));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 2.0 |
|---|---|
| Target | 11.4 |
| Herbie | 3.7 |
if t < -7.11224174972771598e-59 or -9.4661085718560529e-300 < t Initial program 1.5
if -7.11224174972771598e-59 < t < -9.4661085718560529e-300Initial program 4.3
rmApplied associate-/l*_binary64_79364.0
Simplified9.0
rmApplied add-cube-cbrt_binary64_80269.3
Applied times-frac_binary64_799712.3
Final simplification3.7
herbie shell --seed 2020280
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))