\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.3450496563396583 \cdot 10^{+154}:\\
\;\;\;\;\frac{-b_2}{a}\\
\mathbf{elif}\;b_2 \leq 4.0435292778603006 \cdot 10^{-92}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a \cdot c}{b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}}}{\sqrt[3]{a}} \cdot \frac{-1}{\sqrt[3]{a} \cdot \sqrt[3]{a}}\\
\end{array}(FPCore (a b_2 c) :precision binary64 (/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
(FPCore (a b_2 c)
:precision binary64
(if (<= b_2 -1.3450496563396583e+154)
(/ (- b_2) a)
(if (<= b_2 4.0435292778603006e-92)
(/ (- (sqrt (- (* b_2 b_2) (* a c))) b_2) a)
(*
(/ (/ (* a c) (+ b_2 (sqrt (- (* b_2 b_2) (* a c))))) (cbrt a))
(/ -1.0 (* (cbrt a) (cbrt a)))))))double code(double a, double b_2, double c) {
return (-b_2 + sqrt((b_2 * b_2) - (a * c))) / a;
}
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -1.3450496563396583e+154) {
tmp = -b_2 / a;
} else if (b_2 <= 4.0435292778603006e-92) {
tmp = (sqrt((b_2 * b_2) - (a * c)) - b_2) / a;
} else {
tmp = (((a * c) / (b_2 + sqrt((b_2 * b_2) - (a * c)))) / cbrt(a)) * (-1.0 / (cbrt(a) * cbrt(a)));
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.34504965633965828e154Initial program 64.0
Simplified64.0
Taylor expanded around 0 52.2
if -1.34504965633965828e154 < b_2 < 4.04352927786030063e-92Initial program 12.1
Simplified12.1
if 4.04352927786030063e-92 < b_2 Initial program 52.5
Simplified52.5
rmApplied add-cube-cbrt_binary6452.6
Applied *-un-lft-identity_binary6452.6
Applied *-un-lft-identity_binary6452.6
Applied distribute-lft-out--_binary6452.6
Applied times-frac_binary6452.6
rmApplied flip--_binary6452.6
Simplified25.8
Simplified25.8
Final simplification21.9
herbie shell --seed 2020288
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))