\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\begin{array}{l}
\mathbf{if}\;t \le -1.75619348680038361 \cdot 10^{-199} \lor \neg \left(t \le 2.4818379584590413 \cdot 10^{-273}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\mathsf{fma}\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}, \frac{\sqrt{t + a}}{\sqrt[3]{t}}, -\left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right) \cdot \left(b - c\right)\right) + \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right) \cdot \left(\left(-\left(b - c\right)\right) + \left(b - c\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\left(z \cdot \sqrt{t + a}\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right) - t \cdot \left(\left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right) - \left(a - \frac{5}{6}\right) \cdot 2\right)\right)}{t \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right)}}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c) {
return (x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
double temp;
if (((t <= -1.7561934868003836e-199) || !(t <= 2.4818379584590413e-273))) {
temp = (x / (x + (y * exp((2.0 * (fma((z / (cbrt(t) * cbrt(t))), (sqrt((t + a)) / cbrt(t)), -(((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))) * (b - c))) + (((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))) * (-(b - c) + (b - c)))))))));
} else {
temp = (x / (x + (y * exp((2.0 * ((((z * sqrt((t + a))) * ((a - (5.0 / 6.0)) * (t * 3.0))) - (t * ((b - c) * (((a + (5.0 / 6.0)) * ((a - (5.0 / 6.0)) * (t * 3.0))) - ((a - (5.0 / 6.0)) * 2.0))))) / (t * ((a - (5.0 / 6.0)) * (t * 3.0)))))))));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b




Bits error versus c
Results
| Original | 4.0 |
|---|---|
| Target | 2.9 |
| Herbie | 1.9 |
if t < -1.7561934868003836e-199 or 2.4818379584590413e-273 < t Initial program 3.2
rmApplied add-cube-cbrt3.2
Applied times-frac2.0
Applied prod-diff19.1
Simplified1.3
if -1.7561934868003836e-199 < t < 2.4818379584590413e-273Initial program 10.4
rmApplied flip-+14.4
Applied frac-sub14.4
Applied associate-*r/14.4
Applied frac-sub10.4
rmApplied difference-of-squares10.4
Applied associate-*l*6.3
Final simplification1.9
herbie shell --seed 2020058 +o rules:numerics
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:herbie-target
(if (< t -2.118326644891581e-50) (/ x (+ x (* y (exp (* 2 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2 (/ (- (* (* z (sqrt (+ t a))) (* (* 3 t) (- a (/ 5 6)))) (* (- (* (+ (/ 5 6) a) (* 3 t)) 2) (* (- a (/ 5 6)) (* (- b c) t)))) (* (* (* t t) 3) (- a (/ 5 6))))))))) (/ x (+ x (* y (exp (* 2 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5 6)) (/ 2 (* t 3))))))))))))
(/ x (+ x (* y (exp (* 2 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5 6)) (/ 2 (* t 3)))))))))))