\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}\;a \leq 1.4194606864782556 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{a + t}}{t} - \left(b - c\right) \cdot \left(\left(a + 0.8333333333333334\right) - \frac{0.6666666666666666}{t}\right)\right)}}\\
\mathbf{elif}\;a \leq 407588222.4321934:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{\left(z \cdot \sqrt{a + t}\right) \cdot \left(a - 0.8333333333333334\right) - \left(b - c\right) \cdot \left(t \cdot \left(a \cdot a - 0.6944444444444444\right) - 0.6666666666666666 \cdot \left(a - 0.8333333333333334\right)\right)}{t \cdot \left(a - 0.8333333333333334\right)}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}} - \left(b - c\right) \cdot \left(\left(a + 0.8333333333333334\right) - \frac{0.6666666666666666}{t}\right)\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
(if (<= a 1.4194606864782556e-111)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(-
(* z (/ (sqrt (+ a t)) t))
(* (- b c) (- (+ a 0.8333333333333334) (/ 0.6666666666666666 t))))))))
(if (<= a 407588222.4321934)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(/
(-
(* (* z (sqrt (+ a t))) (- a 0.8333333333333334))
(*
(- b c)
(-
(* t (- (* a a) 0.6944444444444444))
(* 0.6666666666666666 (- a 0.8333333333333334)))))
(* t (- a 0.8333333333333334)))))))
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(-
(* (/ z (* (cbrt t) (cbrt t))) (/ (sqrt (+ a t)) (cbrt t)))
(*
(- b c)
(- (+ a 0.8333333333333334) (/ 0.6666666666666666 t)))))))))))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 tmp;
if (a <= 1.4194606864782556e-111) {
tmp = x / (x + (y * pow(exp(2.0), ((z * (sqrt(a + t) / t)) - ((b - c) * ((a + 0.8333333333333334) - (0.6666666666666666 / t)))))));
} else if (a <= 407588222.4321934) {
tmp = x / (x + (y * pow(exp(2.0), ((((z * sqrt(a + t)) * (a - 0.8333333333333334)) - ((b - c) * ((t * ((a * a) - 0.6944444444444444)) - (0.6666666666666666 * (a - 0.8333333333333334))))) / (t * (a - 0.8333333333333334))))));
} else {
tmp = x / (x + (y * pow(exp(2.0), (((z / (cbrt(t) * cbrt(t))) * (sqrt(a + t) / cbrt(t))) - ((b - c) * ((a + 0.8333333333333334) - (0.6666666666666666 / t)))))));
}
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
Results
| Original | 3.7 |
|---|---|
| Target | 3.1 |
| Herbie | 2.1 |
if a < 1.41946068647825557e-111Initial program 2.3
Simplified2.3
rmApplied *-un-lft-identity_binary64_116722.3
Applied times-frac_binary64_116780.8
Simplified0.8
if 1.41946068647825557e-111 < a < 407588222.4321934Initial program 3.5
Simplified3.5
rmApplied flip-+_binary64_116463.5
Applied frac-sub_binary64_116813.5
Applied associate-*r/_binary64_116143.7
Applied frac-sub_binary64_1168112.6
Simplified11.9
Simplified11.9
rmApplied times-frac_binary64_116780.9
Simplified0.9
Simplified0.9
if 407588222.4321934 < a Initial program 5.2
Simplified5.2
rmApplied add-cube-cbrt_binary64_117075.2
Applied times-frac_binary64_116783.9
Final simplification2.1
herbie shell --seed 2020342
(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)))))))))))