\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\begin{array}{l}
\mathbf{if}\;x \le -906498358069.362671 \lor \neg \left(x \le 8.75441292053003659 \cdot 10^{-163}\right):\\
\;\;\;\;\left(x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right) \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}{\frac{y}{x}}\\
\end{array}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 VAR;
if (((x <= -906498358069.3627) || !(x <= 8.754412920530037e-163))) {
VAR = ((x * (pow((1.0 / a), 1.0) / exp(fma(y, log((1.0 / z)), fma(log((1.0 / a)), t, b))))) * (1.0 / y));
} else {
VAR = ((pow((1.0 / a), 1.0) / exp(fma(y, log((1.0 / z)), fma(log((1.0 / a)), t, b)))) / (y / x));
}
return VAR;
}




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.1 |
|---|---|
| Target | 11.4 |
| Herbie | 0.3 |
if x < -906498358069.3627 or 8.754412920530037e-163 < x Initial program 1.2
Taylor expanded around inf 1.2
Simplified0.4
rmApplied div-inv0.4
if -906498358069.3627 < x < 8.754412920530037e-163Initial program 3.5
Taylor expanded around inf 3.6
Simplified0.1
Final simplification0.3
herbie shell --seed 2020102 +o rules:numerics
(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)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))