\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 -8.7468567763316516 \cdot 10^{-54} \lor \neg \left(t \le -2.64131784909554537 \cdot 10^{-262}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{\sqrt{t + a}}{\frac{t}{z}} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right) - \left(\frac{t}{\sqrt{t + a}} \cdot \left(b - c\right)\right) \cdot \left(\left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right) \cdot \left(t \cdot 3\right) - \left(a - \frac{5}{6}\right) \cdot 2\right)}{\frac{t}{\sqrt{t + a}} \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 VAR;
if (((t <= -8.746856776331652e-54) || !(t <= -2.6413178490955454e-262))) {
VAR = (x / (x + (y * exp((2.0 * ((sqrt((t + a)) / (t / z)) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))));
} else {
VAR = (x / (x + (y * exp((2.0 * (((z * ((a - (5.0 / 6.0)) * (t * 3.0))) - (((t / sqrt((t + a))) * (b - c)) * ((((a * a) - ((5.0 / 6.0) * (5.0 / 6.0))) * (t * 3.0)) - ((a - (5.0 / 6.0)) * 2.0)))) / ((t / sqrt((t + a))) * ((a - (5.0 / 6.0)) * (t * 3.0)))))))));
}
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




Bits error versus c
Results
| Original | 3.8 |
|---|---|
| Target | 3.0 |
| Herbie | 3.4 |
if t < -8.746856776331652e-54 or -2.6413178490955454e-262 < t Initial program 3.4
rmApplied *-commutative3.4
Applied associate-/l*2.2
if -8.746856776331652e-54 < t < -2.6413178490955454e-262Initial program 6.5
rmApplied flip-+9.0
Applied frac-sub9.0
Applied associate-*r/9.0
Applied associate-/l*10.2
Applied frac-sub9.5
rmApplied associate-*r*10.7
Final simplification3.4
herbie shell --seed 2020078
(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)))))))))))