
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -42000000000000.0)
(- (/ c b) (/ b a))
(if (<= b 1.7e-99)
(/ 1.0 (/ a (* (- b (sqrt (fma a (* c -4.0) (* b b)))) -0.5)))
(/ (- c) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -42000000000000.0) {
tmp = (c / b) - (b / a);
} else if (b <= 1.7e-99) {
tmp = 1.0 / (a / ((b - sqrt(fma(a, (c * -4.0), (b * b)))) * -0.5));
} else {
tmp = -c / b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -42000000000000.0) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 1.7e-99) tmp = Float64(1.0 / Float64(a / Float64(Float64(b - sqrt(fma(a, Float64(c * -4.0), Float64(b * b)))) * -0.5))); else tmp = Float64(Float64(-c) / b); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -42000000000000.0], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-99], N[(1.0 / N[(a / N[(N[(b - N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-c) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -42000000000000:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-99}:\\
\;\;\;\;\frac{1}{\frac{a}{\left(b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right) \cdot -0.5}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{b}\\
\end{array}
\end{array}
if b < -4.2e13Initial program 60.2%
neg-sub060.2%
associate-+l-60.2%
sub0-neg60.2%
neg-mul-160.2%
associate-*l/60.1%
*-commutative60.1%
associate-/r*60.1%
/-rgt-identity60.1%
metadata-eval60.1%
Simplified60.2%
Taylor expanded in b around -inf 97.5%
mul-1-neg97.5%
unsub-neg97.5%
Simplified97.5%
if -4.2e13 < b < 1.70000000000000003e-99Initial program 83.4%
neg-sub083.4%
associate-+l-83.4%
sub0-neg83.4%
neg-mul-183.4%
associate-*l/83.1%
*-commutative83.1%
associate-/r*83.1%
/-rgt-identity83.1%
metadata-eval83.1%
Simplified83.1%
associate-*r/83.4%
clear-num83.4%
Applied egg-rr83.4%
if 1.70000000000000003e-99 < b Initial program 16.9%
neg-sub016.9%
associate-+l-16.9%
sub0-neg16.9%
neg-mul-116.9%
associate-*l/16.9%
*-commutative16.9%
associate-/r*16.9%
/-rgt-identity16.9%
metadata-eval16.9%
Simplified16.9%
Taylor expanded in b around inf 83.6%
mul-1-neg83.6%
distribute-neg-frac83.6%
Simplified83.6%
Final simplification87.6%
(FPCore (a b c)
:precision binary64
(if (<= b -2e+154)
(- (/ c b) (/ b a))
(if (<= b 1.12e-100)
(/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0))
(/ (- c) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e+154) {
tmp = (c / b) - (b / a);
} else if (b <= 1.12e-100) {
tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else {
tmp = -c / b;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-2d+154)) then
tmp = (c / b) - (b / a)
else if (b <= 1.12d-100) then
tmp = (sqrt(((b * b) - (c * (a * 4.0d0)))) - b) / (a * 2.0d0)
else
tmp = -c / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2e+154) {
tmp = (c / b) - (b / a);
} else if (b <= 1.12e-100) {
tmp = (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else {
tmp = -c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2e+154: tmp = (c / b) - (b / a) elif b <= 1.12e-100: tmp = (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0) else: tmp = -c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2e+154) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 1.12e-100) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0)); else tmp = Float64(Float64(-c) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2e+154) tmp = (c / b) - (b / a); elseif (b <= 1.12e-100) tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0); else tmp = -c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2e+154], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e-100], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[((-c) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{-100}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{b}\\
\end{array}
\end{array}
if b < -2.00000000000000007e154Initial program 38.6%
neg-sub038.6%
associate-+l-38.6%
sub0-neg38.6%
neg-mul-138.6%
associate-*l/38.6%
*-commutative38.6%
associate-/r*38.6%
/-rgt-identity38.6%
metadata-eval38.6%
Simplified38.7%
Taylor expanded in b around -inf 96.2%
mul-1-neg96.2%
unsub-neg96.2%
Simplified96.2%
if -2.00000000000000007e154 < b < 1.11999999999999996e-100Initial program 87.3%
if 1.11999999999999996e-100 < b Initial program 16.9%
neg-sub016.9%
associate-+l-16.9%
sub0-neg16.9%
neg-mul-116.9%
associate-*l/16.9%
*-commutative16.9%
associate-/r*16.9%
/-rgt-identity16.9%
metadata-eval16.9%
Simplified16.9%
Taylor expanded in b around inf 83.6%
mul-1-neg83.6%
distribute-neg-frac83.6%
Simplified83.6%
Final simplification87.6%
(FPCore (a b c)
:precision binary64
(if (<= b -4.3e-160)
(- (/ c b) (/ b a))
(if (<= b 1.2e-106)
(/ (- (sqrt (* a (* c -4.0))) b) (* a 2.0))
(/ (- c) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -4.3e-160) {
tmp = (c / b) - (b / a);
} else if (b <= 1.2e-106) {
tmp = (sqrt((a * (c * -4.0))) - b) / (a * 2.0);
} else {
tmp = -c / b;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-4.3d-160)) then
tmp = (c / b) - (b / a)
else if (b <= 1.2d-106) then
tmp = (sqrt((a * (c * (-4.0d0)))) - b) / (a * 2.0d0)
else
tmp = -c / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -4.3e-160) {
tmp = (c / b) - (b / a);
} else if (b <= 1.2e-106) {
tmp = (Math.sqrt((a * (c * -4.0))) - b) / (a * 2.0);
} else {
tmp = -c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -4.3e-160: tmp = (c / b) - (b / a) elif b <= 1.2e-106: tmp = (math.sqrt((a * (c * -4.0))) - b) / (a * 2.0) else: tmp = -c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -4.3e-160) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 1.2e-106) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -4.0))) - b) / Float64(a * 2.0)); else tmp = Float64(Float64(-c) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -4.3e-160) tmp = (c / b) - (b / a); elseif (b <= 1.2e-106) tmp = (sqrt((a * (c * -4.0))) - b) / (a * 2.0); else tmp = -c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -4.3e-160], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.2e-106], N[(N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[((-c) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.3 \cdot 10^{-160}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{-106}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -4\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{b}\\
\end{array}
\end{array}
if b < -4.30000000000000014e-160Initial program 67.0%
neg-sub067.0%
associate-+l-67.0%
sub0-neg67.0%
neg-mul-167.0%
associate-*l/66.9%
*-commutative66.9%
associate-/r*66.9%
/-rgt-identity66.9%
metadata-eval66.9%
Simplified66.9%
Taylor expanded in b around -inf 87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
if -4.30000000000000014e-160 < b < 1.1999999999999999e-106Initial program 82.0%
Taylor expanded in b around 0 82.0%
*-commutative82.0%
*-commutative82.0%
associate-*r*82.0%
Simplified82.0%
if 1.1999999999999999e-106 < b Initial program 16.9%
neg-sub016.9%
associate-+l-16.9%
sub0-neg16.9%
neg-mul-116.9%
associate-*l/16.9%
*-commutative16.9%
associate-/r*16.9%
/-rgt-identity16.9%
metadata-eval16.9%
Simplified16.9%
Taylor expanded in b around inf 83.6%
mul-1-neg83.6%
distribute-neg-frac83.6%
Simplified83.6%
Final simplification84.7%
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (- (/ c b) (/ b a)) (/ (- c) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (c / b) - (b / a);
} else {
tmp = -c / b;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-5d-310)) then
tmp = (c / b) - (b / a)
else
tmp = -c / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (c / b) - (b / a);
} else {
tmp = -c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-310: tmp = (c / b) - (b / a) else: tmp = -c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = Float64(Float64(c / b) - Float64(b / a)); else tmp = Float64(Float64(-c) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-310) tmp = (c / b) - (b / a); else tmp = -c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], N[((-c) / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{b}\\
\end{array}
\end{array}
if b < -4.999999999999985e-310Initial program 70.1%
neg-sub070.1%
associate-+l-70.1%
sub0-neg70.1%
neg-mul-170.1%
associate-*l/69.9%
*-commutative69.9%
associate-/r*69.9%
/-rgt-identity69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in b around -inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
Simplified70.2%
if -4.999999999999985e-310 < b Initial program 32.6%
neg-sub032.6%
associate-+l-32.6%
sub0-neg32.6%
neg-mul-132.6%
associate-*l/32.5%
*-commutative32.5%
associate-/r*32.5%
/-rgt-identity32.5%
metadata-eval32.5%
Simplified32.5%
Taylor expanded in b around inf 65.7%
mul-1-neg65.7%
distribute-neg-frac65.7%
Simplified65.7%
Final simplification68.0%
(FPCore (a b c) :precision binary64 (if (<= b 5.2e+25) (/ (- b) a) (/ c b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 5.2e+25) {
tmp = -b / a;
} else {
tmp = c / b;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= 5.2d+25) then
tmp = -b / a
else
tmp = c / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 5.2e+25) {
tmp = -b / a;
} else {
tmp = c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 5.2e+25: tmp = -b / a else: tmp = c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 5.2e+25) tmp = Float64(Float64(-b) / a); else tmp = Float64(c / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 5.2e+25) tmp = -b / a; else tmp = c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 5.2e+25], N[((-b) / a), $MachinePrecision], N[(c / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{-b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b}\\
\end{array}
\end{array}
if b < 5.1999999999999997e25Initial program 65.9%
neg-sub065.9%
associate-+l-65.9%
sub0-neg65.9%
neg-mul-165.9%
associate-*l/65.7%
*-commutative65.7%
associate-/r*65.7%
/-rgt-identity65.7%
metadata-eval65.7%
Simplified65.7%
Taylor expanded in b around -inf 49.1%
associate-*r/49.1%
mul-1-neg49.1%
Simplified49.1%
if 5.1999999999999997e25 < b Initial program 11.7%
neg-sub011.7%
associate-+l-11.7%
sub0-neg11.7%
neg-mul-111.7%
associate-*l/11.7%
*-commutative11.7%
associate-/r*11.7%
/-rgt-identity11.7%
metadata-eval11.7%
Simplified11.7%
Taylor expanded in b around -inf 2.5%
mul-1-neg2.5%
unsub-neg2.5%
Simplified2.5%
Taylor expanded in c around inf 31.1%
Final simplification44.3%
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (/ (- b) a) (/ (- c) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = -b / a;
} else {
tmp = -c / b;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-5d-310)) then
tmp = -b / a
else
tmp = -c / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = -b / a;
} else {
tmp = -c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-310: tmp = -b / a else: tmp = -c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = Float64(Float64(-b) / a); else tmp = Float64(Float64(-c) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-310) tmp = -b / a; else tmp = -c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[((-b) / a), $MachinePrecision], N[((-c) / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{-b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{b}\\
\end{array}
\end{array}
if b < -4.999999999999985e-310Initial program 70.1%
neg-sub070.1%
associate-+l-70.1%
sub0-neg70.1%
neg-mul-170.1%
associate-*l/69.9%
*-commutative69.9%
associate-/r*69.9%
/-rgt-identity69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in b around -inf 70.1%
associate-*r/70.1%
mul-1-neg70.1%
Simplified70.1%
if -4.999999999999985e-310 < b Initial program 32.6%
neg-sub032.6%
associate-+l-32.6%
sub0-neg32.6%
neg-mul-132.6%
associate-*l/32.5%
*-commutative32.5%
associate-/r*32.5%
/-rgt-identity32.5%
metadata-eval32.5%
Simplified32.5%
Taylor expanded in b around inf 65.7%
mul-1-neg65.7%
distribute-neg-frac65.7%
Simplified65.7%
Final simplification67.9%
(FPCore (a b c) :precision binary64 (/ c b))
double code(double a, double b, double c) {
return c / b;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c / b
end function
public static double code(double a, double b, double c) {
return c / b;
}
def code(a, b, c): return c / b
function code(a, b, c) return Float64(c / b) end
function tmp = code(a, b, c) tmp = c / b; end
code[a_, b_, c_] := N[(c / b), $MachinePrecision]
\begin{array}{l}
\\
\frac{c}{b}
\end{array}
Initial program 51.5%
neg-sub051.5%
associate-+l-51.5%
sub0-neg51.5%
neg-mul-151.5%
associate-*l/51.4%
*-commutative51.4%
associate-/r*51.4%
/-rgt-identity51.4%
metadata-eval51.4%
Simplified51.4%
Taylor expanded in b around -inf 36.5%
mul-1-neg36.5%
unsub-neg36.5%
Simplified36.5%
Taylor expanded in c around inf 10.5%
Final simplification10.5%
herbie shell --seed 2023255
(FPCore (a b c)
:name "Quadratic roots, full range"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))