
(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(4.0 * Float64(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[(4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{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(4.0 * Float64(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[(4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -3.8e-86)
(/ (- c) b)
(if (<= b 2.95e+100)
(* -0.5 (/ (+ b (sqrt (fma a (* c -4.0) (* b b)))) a))
(/ (- b) a))))
double code(double a, double b, double c) {
double tmp;
if (b <= -3.8e-86) {
tmp = -c / b;
} else if (b <= 2.95e+100) {
tmp = -0.5 * ((b + sqrt(fma(a, (c * -4.0), (b * b)))) / a);
} else {
tmp = -b / a;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -3.8e-86) tmp = Float64(Float64(-c) / b); elseif (b <= 2.95e+100) tmp = Float64(-0.5 * Float64(Float64(b + sqrt(fma(a, Float64(c * -4.0), Float64(b * b)))) / a)); else tmp = Float64(Float64(-b) / a); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -3.8e-86], N[((-c) / b), $MachinePrecision], If[LessEqual[b, 2.95e+100], N[(-0.5 * N[(N[(b + N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[((-b) / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{elif}\;b \leq 2.95 \cdot 10^{+100}:\\
\;\;\;\;-0.5 \cdot \frac{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\
\end{array}
\end{array}
if b < -3.8e-86Initial program 16.4%
Simplified16.4%
Taylor expanded in b around -inf 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
if -3.8e-86 < b < 2.95000000000000013e100Initial program 84.2%
Simplified84.3%
if 2.95000000000000013e100 < b Initial program 55.6%
Simplified55.7%
Taylor expanded in b around inf 98.0%
associate-*r/98.0%
mul-1-neg98.0%
Simplified98.0%
Final simplification89.4%
(FPCore (a b c)
:precision binary64
(if (<= b -1.05e-84)
(/ (- c) b)
(if (<= b 2e+100)
(/ (- (- b) (sqrt (- (* b b) (* 4.0 (* c a))))) (* a 2.0))
(/ (- b) a))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.05e-84) {
tmp = -c / b;
} else if (b <= 2e+100) {
tmp = (-b - sqrt(((b * b) - (4.0 * (c * a))))) / (a * 2.0);
} else {
tmp = -b / a;
}
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 <= (-1.05d-84)) then
tmp = -c / b
else if (b <= 2d+100) then
tmp = (-b - sqrt(((b * b) - (4.0d0 * (c * a))))) / (a * 2.0d0)
else
tmp = -b / a
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.05e-84) {
tmp = -c / b;
} else if (b <= 2e+100) {
tmp = (-b - Math.sqrt(((b * b) - (4.0 * (c * a))))) / (a * 2.0);
} else {
tmp = -b / a;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.05e-84: tmp = -c / b elif b <= 2e+100: tmp = (-b - math.sqrt(((b * b) - (4.0 * (c * a))))) / (a * 2.0) else: tmp = -b / a return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.05e-84) tmp = Float64(Float64(-c) / b); elseif (b <= 2e+100) tmp = Float64(Float64(Float64(-b) - sqrt(Float64(Float64(b * b) - Float64(4.0 * Float64(c * a))))) / Float64(a * 2.0)); else tmp = Float64(Float64(-b) / a); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.05e-84) tmp = -c / b; elseif (b <= 2e+100) tmp = (-b - sqrt(((b * b) - (4.0 * (c * a))))) / (a * 2.0); else tmp = -b / a; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.05e-84], N[((-c) / b), $MachinePrecision], If[LessEqual[b, 2e+100], N[(N[((-b) - N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(4.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[((-b) / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{-84}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+100}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\
\end{array}
\end{array}
if b < -1.04999999999999999e-84Initial program 16.4%
Simplified16.4%
Taylor expanded in b around -inf 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
if -1.04999999999999999e-84 < b < 2.00000000000000003e100Initial program 84.2%
if 2.00000000000000003e100 < b Initial program 55.6%
Simplified55.7%
Taylor expanded in b around inf 98.0%
associate-*r/98.0%
mul-1-neg98.0%
Simplified98.0%
Final simplification89.4%
(FPCore (a b c)
:precision binary64
(if (<= b -5e-83)
(/ (- c) b)
(if (<= b 1.9e-126)
(* -0.5 (/ (+ b (sqrt (* c (* a -4.0)))) a))
(- (/ c b) (/ b a)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-83) {
tmp = -c / b;
} else if (b <= 1.9e-126) {
tmp = -0.5 * ((b + sqrt((c * (a * -4.0)))) / a);
} else {
tmp = (c / b) - (b / a);
}
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-83)) then
tmp = -c / b
else if (b <= 1.9d-126) then
tmp = (-0.5d0) * ((b + sqrt((c * (a * (-4.0d0))))) / a)
else
tmp = (c / b) - (b / a)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -5e-83) {
tmp = -c / b;
} else if (b <= 1.9e-126) {
tmp = -0.5 * ((b + Math.sqrt((c * (a * -4.0)))) / a);
} else {
tmp = (c / b) - (b / a);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-83: tmp = -c / b elif b <= 1.9e-126: tmp = -0.5 * ((b + math.sqrt((c * (a * -4.0)))) / a) else: tmp = (c / b) - (b / a) return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-83) tmp = Float64(Float64(-c) / b); elseif (b <= 1.9e-126) tmp = Float64(-0.5 * Float64(Float64(b + sqrt(Float64(c * Float64(a * -4.0)))) / a)); else tmp = Float64(Float64(c / b) - Float64(b / a)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-83) tmp = -c / b; elseif (b <= 1.9e-126) tmp = -0.5 * ((b + sqrt((c * (a * -4.0)))) / a); else tmp = (c / b) - (b / a); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-83], N[((-c) / b), $MachinePrecision], If[LessEqual[b, 1.9e-126], N[(-0.5 * N[(N[(b + N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-83}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-126}:\\
\;\;\;\;-0.5 \cdot \frac{b + \sqrt{c \cdot \left(a \cdot -4\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}
\end{array}
if b < -5e-83Initial program 16.4%
Simplified16.4%
Taylor expanded in b around -inf 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
if -5e-83 < b < 1.8999999999999999e-126Initial program 77.8%
Simplified78.0%
add-sqr-sqrt77.5%
pow277.5%
pow1/277.5%
sqrt-pow177.5%
metadata-eval77.5%
Applied egg-rr77.5%
Taylor expanded in b around 0 74.7%
associate-*r*74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in c around 0 43.1%
+-commutative43.1%
*-commutative43.1%
log-prod71.1%
*-commutative71.1%
exp-to-pow74.9%
unpow274.9%
pow-sqr75.4%
metadata-eval75.4%
unpow1/275.4%
Simplified75.4%
if 1.8999999999999999e-126 < b Initial program 73.6%
Simplified73.6%
Taylor expanded in b around inf 84.8%
mul-1-neg84.8%
unsub-neg84.8%
Simplified84.8%
Final simplification85.0%
(FPCore (a b c) :precision binary64 (if (<= b -2e-310) (/ (- c) b) (- (/ c b) (/ b a))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e-310) {
tmp = -c / b;
} else {
tmp = (c / b) - (b / a);
}
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-310)) then
tmp = -c / b
else
tmp = (c / b) - (b / a)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2e-310) {
tmp = -c / b;
} else {
tmp = (c / b) - (b / a);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2e-310: tmp = -c / b else: tmp = (c / b) - (b / a) return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2e-310) tmp = Float64(Float64(-c) / b); else tmp = Float64(Float64(c / b) - Float64(b / a)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2e-310) tmp = -c / b; else tmp = (c / b) - (b / a); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2e-310], N[((-c) / b), $MachinePrecision], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}
\end{array}
if b < -1.999999999999994e-310Initial program 31.9%
Simplified31.9%
Taylor expanded in b around -inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if -1.999999999999994e-310 < b Initial program 74.5%
Simplified74.7%
Taylor expanded in b around inf 66.6%
mul-1-neg66.6%
unsub-neg66.6%
Simplified66.6%
Final simplification69.3%
(FPCore (a b c) :precision binary64 (if (<= b -3.3e+23) (/ c b) (/ (- b) a)))
double code(double a, double b, double c) {
double tmp;
if (b <= -3.3e+23) {
tmp = c / b;
} else {
tmp = -b / a;
}
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 <= (-3.3d+23)) then
tmp = c / b
else
tmp = -b / a
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -3.3e+23) {
tmp = c / b;
} else {
tmp = -b / a;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -3.3e+23: tmp = c / b else: tmp = -b / a return tmp
function code(a, b, c) tmp = 0.0 if (b <= -3.3e+23) tmp = Float64(c / b); else tmp = Float64(Float64(-b) / a); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -3.3e+23) tmp = c / b; else tmp = -b / a; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -3.3e+23], N[(c / b), $MachinePrecision], N[((-b) / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.3 \cdot 10^{+23}:\\
\;\;\;\;\frac{c}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\
\end{array}
\end{array}
if b < -3.30000000000000029e23Initial program 14.2%
Simplified14.3%
Taylor expanded in a around 0 2.2%
Taylor expanded in b around 0 35.8%
if -3.30000000000000029e23 < b Initial program 68.5%
Simplified68.6%
Taylor expanded in b around inf 43.9%
associate-*r/43.9%
mul-1-neg43.9%
Simplified43.9%
Final simplification41.2%
(FPCore (a b c) :precision binary64 (if (<= b -2e-310) (/ (- c) b) (/ (- b) a)))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e-310) {
tmp = -c / b;
} else {
tmp = -b / a;
}
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-310)) then
tmp = -c / b
else
tmp = -b / a
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2e-310) {
tmp = -c / b;
} else {
tmp = -b / a;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2e-310: tmp = -c / b else: tmp = -b / a return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2e-310) tmp = Float64(Float64(-c) / b); else tmp = Float64(Float64(-b) / a); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2e-310) tmp = -c / b; else tmp = -b / a; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2e-310], N[((-c) / b), $MachinePrecision], N[((-b) / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\
\end{array}
\end{array}
if b < -1.999999999999994e-310Initial program 31.9%
Simplified31.9%
Taylor expanded in b around -inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if -1.999999999999994e-310 < b Initial program 74.5%
Simplified74.7%
Taylor expanded in b around inf 66.3%
associate-*r/66.3%
mul-1-neg66.3%
Simplified66.3%
Final simplification69.2%
(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 50.0%
Simplified50.1%
Taylor expanded in a around 0 28.6%
Taylor expanded in b around 0 14.1%
Final simplification14.1%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (sqrt (- (* b b) (* 4.0 (* a c))))))
(if (< b 0.0)
(/ c (* a (/ (+ (- b) t_0) (* 2.0 a))))
(/ (- (- b) t_0) (* 2.0 a)))))
double code(double a, double b, double c) {
double t_0 = sqrt(((b * b) - (4.0 * (a * c))));
double tmp;
if (b < 0.0) {
tmp = c / (a * ((-b + t_0) / (2.0 * a)));
} else {
tmp = (-b - t_0) / (2.0 * a);
}
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) :: t_0
real(8) :: tmp
t_0 = sqrt(((b * b) - (4.0d0 * (a * c))))
if (b < 0.0d0) then
tmp = c / (a * ((-b + t_0) / (2.0d0 * a)))
else
tmp = (-b - t_0) / (2.0d0 * a)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = Math.sqrt(((b * b) - (4.0 * (a * c))));
double tmp;
if (b < 0.0) {
tmp = c / (a * ((-b + t_0) / (2.0 * a)));
} else {
tmp = (-b - t_0) / (2.0 * a);
}
return tmp;
}
def code(a, b, c): t_0 = math.sqrt(((b * b) - (4.0 * (a * c)))) tmp = 0 if b < 0.0: tmp = c / (a * ((-b + t_0) / (2.0 * a))) else: tmp = (-b - t_0) / (2.0 * a) return tmp
function code(a, b, c) t_0 = sqrt(Float64(Float64(b * b) - Float64(4.0 * Float64(a * c)))) tmp = 0.0 if (b < 0.0) tmp = Float64(c / Float64(a * Float64(Float64(Float64(-b) + t_0) / Float64(2.0 * a)))); else tmp = Float64(Float64(Float64(-b) - t_0) / Float64(2.0 * a)); end return tmp end
function tmp_2 = code(a, b, c) t_0 = sqrt(((b * b) - (4.0 * (a * c)))); tmp = 0.0; if (b < 0.0) tmp = c / (a * ((-b + t_0) / (2.0 * a))); else tmp = (-b - t_0) / (2.0 * a); end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Less[b, 0.0], N[(c / N[(a * N[(N[((-b) + t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-b) - t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\\
\mathbf{if}\;b < 0:\\
\;\;\;\;\frac{c}{a \cdot \frac{\left(-b\right) + t_0}{2 \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) - t_0}{2 \cdot a}\\
\end{array}
\end{array}
herbie shell --seed 2023187
(FPCore (a b c)
:name "quadm (p42, negative)"
:precision binary64
:herbie-target
(if (< b 0.0) (/ c (* a (/ (+ (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))) (/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))
(/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))