\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}
t_1 := \frac{z \cdot \sqrt{t + a}}{t}\\
\mathbf{if}\;t_1 - \left(b - c\right) \cdot \left(\left(a + 0.8333333333333334\right) - \frac{2}{t \cdot 3}\right) \leq \infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(\left(a + 0.8333333333333334\right) - \frac{0.6666666666666666}{t}, c - b, t_1\right)\right)}, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\frac{\log \left(e^{\mathsf{fma}\left(0.6666666666666666, b, \mathsf{fma}\left(z, \sqrt{a}, c \cdot -0.6666666666666666\right)\right)}\right)}{t}\right)}, x\right)}\\
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z (sqrt (+ t a))) t)))
(if (<=
(- t_1 (* (- b c) (- (+ a 0.8333333333333334) (/ 2.0 (* t 3.0)))))
INFINITY)
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(- (+ a 0.8333333333333334) (/ 0.6666666666666666 t))
(- c b)
t_1))
x))
(/
x
(fma
y
(pow
(exp 2.0)
(/
(log
(exp
(fma
0.6666666666666666
b
(fma z (sqrt a) (* c -0.6666666666666666)))))
t))
x)))))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 t_1 = (z * sqrt(t + a)) / t;
double tmp;
if ((t_1 - ((b - c) * ((a + 0.8333333333333334) - (2.0 / (t * 3.0))))) <= ((double) INFINITY)) {
tmp = x / fma(y, pow(exp(2.0), fma(((a + 0.8333333333333334) - (0.6666666666666666 / t)), (c - b), t_1)), x);
} else {
tmp = x / fma(y, pow(exp(2.0), (log(exp(fma(0.6666666666666666, b, fma(z, sqrt(a), (c * -0.6666666666666666))))) / t)), x);
}
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




Bits error versus c
| Original | 3.5 |
|---|---|
| Target | 3.0 |
| Herbie | 1.5 |
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 0.7
Simplified0.7
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 64.0
Simplified37.1
Taylor expanded in t around 0 18.4
Simplified18.4
Applied add-log-exp_binary6418.5
Final simplification1.5
herbie shell --seed 2022097
(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.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2.0 (/ (- (* (* z (sqrt (+ t a))) (* (* 3.0 t) (- a (/ 5.0 6.0)))) (* (- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0) (* (- a (/ 5.0 6.0)) (* (- b c) t)))) (* (* (* t t) 3.0) (- a (/ 5.0 6.0))))))))) (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))