
(FPCore (a b c) :precision binary64 (let* ((t_0 (sqrt (- (* b b) (* (* 4.0 a) c))))) (if (>= b 0.0) (/ (- (- b) t_0) (* 2.0 a)) (/ (* 2.0 c) (+ (- b) t_0)))))
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 = (-b - t_0) / (2.0 * a);
} else {
tmp = (2.0 * c) / (-b + t_0);
}
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 = (-b - t_0) / (2.0d0 * a)
else
tmp = (2.0d0 * c) / (-b + t_0)
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 = (-b - t_0) / (2.0 * a);
} else {
tmp = (2.0 * c) / (-b + t_0);
}
return tmp;
}
def code(a, b, c): t_0 = math.sqrt(((b * b) - ((4.0 * a) * c))) tmp = 0 if b >= 0.0: tmp = (-b - t_0) / (2.0 * a) else: tmp = (2.0 * c) / (-b + t_0) return tmp
function code(a, b, c) t_0 = sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c))) tmp = 0.0 if (b >= 0.0) tmp = Float64(Float64(Float64(-b) - t_0) / Float64(2.0 * a)); else tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) + t_0)); 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 = (-b - t_0) / (2.0 * a); else tmp = (2.0 * c) / (-b + t_0); end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[GreaterEqual[b, 0.0], N[(N[((-b) - t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) + t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - t\_0}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t\_0}\\
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b c) :precision binary64 (let* ((t_0 (sqrt (- (* b b) (* (* 4.0 a) c))))) (if (>= b 0.0) (/ (- (- b) t_0) (* 2.0 a)) (/ (* 2.0 c) (+ (- b) t_0)))))
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 = (-b - t_0) / (2.0 * a);
} else {
tmp = (2.0 * c) / (-b + t_0);
}
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 = (-b - t_0) / (2.0d0 * a)
else
tmp = (2.0d0 * c) / (-b + t_0)
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 = (-b - t_0) / (2.0 * a);
} else {
tmp = (2.0 * c) / (-b + t_0);
}
return tmp;
}
def code(a, b, c): t_0 = math.sqrt(((b * b) - ((4.0 * a) * c))) tmp = 0 if b >= 0.0: tmp = (-b - t_0) / (2.0 * a) else: tmp = (2.0 * c) / (-b + t_0) return tmp
function code(a, b, c) t_0 = sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c))) tmp = 0.0 if (b >= 0.0) tmp = Float64(Float64(Float64(-b) - t_0) / Float64(2.0 * a)); else tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) + t_0)); 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 = (-b - t_0) / (2.0 * a); else tmp = (2.0 * c) / (-b + t_0); end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[GreaterEqual[b, 0.0], N[(N[((-b) - t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) + t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - t\_0}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t\_0}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(let* ((t_0 (sqrt (- (* b b) (* c (* a 4.0))))) (t_1 (/ b (- a))))
(if (<= b -8.5e+58)
(if (>= b 0.0) t_1 (/ c (- b)))
(if (<= b 2e+106)
(if (>= b 0.0) (/ (+ b t_0) (* a (- 2.0))) (/ (* c 2.0) (- t_0 b)))
(if (>= b 0.0) t_1 (* c (/ b (* c (- a)))))))))
double code(double a, double b, double c) {
double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
double t_1 = b / -a;
double tmp_1;
if (b <= -8.5e+58) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_1;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b <= 2e+106) {
double tmp_3;
if (b >= 0.0) {
tmp_3 = (b + t_0) / (a * -2.0);
} else {
tmp_3 = (c * 2.0) / (t_0 - b);
}
tmp_1 = tmp_3;
} else if (b >= 0.0) {
tmp_1 = t_1;
} else {
tmp_1 = c * (b / (c * -a));
}
return tmp_1;
}
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) :: t_1
real(8) :: tmp
real(8) :: tmp_1
real(8) :: tmp_2
real(8) :: tmp_3
t_0 = sqrt(((b * b) - (c * (a * 4.0d0))))
t_1 = b / -a
if (b <= (-8.5d+58)) then
if (b >= 0.0d0) then
tmp_2 = t_1
else
tmp_2 = c / -b
end if
tmp_1 = tmp_2
else if (b <= 2d+106) then
if (b >= 0.0d0) then
tmp_3 = (b + t_0) / (a * -2.0d0)
else
tmp_3 = (c * 2.0d0) / (t_0 - b)
end if
tmp_1 = tmp_3
else if (b >= 0.0d0) then
tmp_1 = t_1
else
tmp_1 = c * (b / (c * -a))
end if
code = tmp_1
end function
public static double code(double a, double b, double c) {
double t_0 = Math.sqrt(((b * b) - (c * (a * 4.0))));
double t_1 = b / -a;
double tmp_1;
if (b <= -8.5e+58) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_1;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b <= 2e+106) {
double tmp_3;
if (b >= 0.0) {
tmp_3 = (b + t_0) / (a * -2.0);
} else {
tmp_3 = (c * 2.0) / (t_0 - b);
}
tmp_1 = tmp_3;
} else if (b >= 0.0) {
tmp_1 = t_1;
} else {
tmp_1 = c * (b / (c * -a));
}
return tmp_1;
}
def code(a, b, c): t_0 = math.sqrt(((b * b) - (c * (a * 4.0)))) t_1 = b / -a tmp_1 = 0 if b <= -8.5e+58: tmp_2 = 0 if b >= 0.0: tmp_2 = t_1 else: tmp_2 = c / -b tmp_1 = tmp_2 elif b <= 2e+106: tmp_3 = 0 if b >= 0.0: tmp_3 = (b + t_0) / (a * -2.0) else: tmp_3 = (c * 2.0) / (t_0 - b) tmp_1 = tmp_3 elif b >= 0.0: tmp_1 = t_1 else: tmp_1 = c * (b / (c * -a)) return tmp_1
function code(a, b, c) t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) t_1 = Float64(b / Float64(-a)) tmp_1 = 0.0 if (b <= -8.5e+58) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = t_1; else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b <= 2e+106) tmp_3 = 0.0 if (b >= 0.0) tmp_3 = Float64(Float64(b + t_0) / Float64(a * Float64(-2.0))); else tmp_3 = Float64(Float64(c * 2.0) / Float64(t_0 - b)); end tmp_1 = tmp_3; elseif (b >= 0.0) tmp_1 = t_1; else tmp_1 = Float64(c * Float64(b / Float64(c * Float64(-a)))); end return tmp_1 end
function tmp_5 = code(a, b, c) t_0 = sqrt(((b * b) - (c * (a * 4.0)))); t_1 = b / -a; tmp_2 = 0.0; if (b <= -8.5e+58) tmp_3 = 0.0; if (b >= 0.0) tmp_3 = t_1; else tmp_3 = c / -b; end tmp_2 = tmp_3; elseif (b <= 2e+106) tmp_4 = 0.0; if (b >= 0.0) tmp_4 = (b + t_0) / (a * -2.0); else tmp_4 = (c * 2.0) / (t_0 - b); end tmp_2 = tmp_4; elseif (b >= 0.0) tmp_2 = t_1; else tmp_2 = c * (b / (c * -a)); end tmp_5 = tmp_2; end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(b / (-a)), $MachinePrecision]}, If[LessEqual[b, -8.5e+58], If[GreaterEqual[b, 0.0], t$95$1, N[(c / (-b)), $MachinePrecision]], If[LessEqual[b, 2e+106], If[GreaterEqual[b, 0.0], N[(N[(b + t$95$0), $MachinePrecision] / N[(a * (-2.0)), $MachinePrecision]), $MachinePrecision], N[(N[(c * 2.0), $MachinePrecision] / N[(t$95$0 - b), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$1, N[(c * N[(b / N[(c * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\
t_1 := \frac{b}{-a}\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+58}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+106}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b + t\_0}{a \cdot \left(-2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{t\_0 - b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{b}{c \cdot \left(-a\right)}\\
\end{array}
\end{array}
if b < -8.50000000000000015e58Initial program 56.8%
Simplified57.1%
Taylor expanded in a around 0 57.1%
associate-*r/57.1%
mul-1-neg57.1%
Simplified57.1%
Taylor expanded in b around -inf 90.4%
Taylor expanded in b around 0 90.8%
neg-mul-190.8%
distribute-neg-frac90.8%
neg-mul-190.8%
distribute-frac-neg90.8%
Simplified90.8%
if -8.50000000000000015e58 < b < 2.00000000000000018e106Initial program 85.2%
if 2.00000000000000018e106 < b Initial program 56.8%
Simplified56.9%
Taylor expanded in a around 0 96.9%
associate-*r/96.9%
mul-1-neg96.9%
Simplified96.9%
Taylor expanded in c around 0 96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
Final simplification89.4%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (/ b (- a))))
(if (<= b -8.5e+58)
(if (>= b 0.0) t_0 (/ c (- b)))
(if (<= b 1.3e-217)
(if (>= b 0.0)
(* c (fma -1.0 (/ (/ b a) c) (/ 1.0 b)))
(/ (* c 2.0) (- (sqrt (- (* b b) (* c (* a 4.0)))) b)))
(if (>= b 0.0) t_0 (* 2.0 (sqrt (/ c (* a -4.0)))))))))
double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -8.5e+58) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b <= 1.3e-217) {
double tmp_3;
if (b >= 0.0) {
tmp_3 = c * fma(-1.0, ((b / a) / c), (1.0 / b));
} else {
tmp_3 = (c * 2.0) / (sqrt(((b * b) - (c * (a * 4.0)))) - b);
}
tmp_1 = tmp_3;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = 2.0 * sqrt((c / (a * -4.0)));
}
return tmp_1;
}
function code(a, b, c) t_0 = Float64(b / Float64(-a)) tmp_1 = 0.0 if (b <= -8.5e+58) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = t_0; else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b <= 1.3e-217) tmp_3 = 0.0 if (b >= 0.0) tmp_3 = Float64(c * fma(-1.0, Float64(Float64(b / a) / c), Float64(1.0 / b))); else tmp_3 = Float64(Float64(c * 2.0) / Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b)); end tmp_1 = tmp_3; elseif (b >= 0.0) tmp_1 = t_0; else tmp_1 = Float64(2.0 * sqrt(Float64(c / Float64(a * -4.0)))); end return tmp_1 end
code[a_, b_, c_] := Block[{t$95$0 = N[(b / (-a)), $MachinePrecision]}, If[LessEqual[b, -8.5e+58], If[GreaterEqual[b, 0.0], t$95$0, N[(c / (-b)), $MachinePrecision]], If[LessEqual[b, 1.3e-217], If[GreaterEqual[b, 0.0], N[(c * N[(-1.0 * N[(N[(b / a), $MachinePrecision] / c), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * 2.0), $MachinePrecision] / N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$0, N[(2.0 * N[Sqrt[N[(c / N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{b}{-a}\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+58}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{-217}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \mathsf{fma}\left(-1, \frac{\frac{b}{a}}{c}, \frac{1}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \sqrt{\frac{c}{a \cdot -4}}\\
\end{array}
\end{array}
if b < -8.50000000000000015e58Initial program 56.8%
Simplified57.1%
Taylor expanded in a around 0 57.1%
associate-*r/57.1%
mul-1-neg57.1%
Simplified57.1%
Taylor expanded in b around -inf 90.4%
Taylor expanded in b around 0 90.8%
neg-mul-190.8%
distribute-neg-frac90.8%
neg-mul-190.8%
distribute-frac-neg90.8%
Simplified90.8%
if -8.50000000000000015e58 < b < 1.29999999999999997e-217Initial program 80.2%
Taylor expanded in a around 0 69.8%
distribute-lft-out--69.8%
associate-/l*69.8%
Simplified69.8%
Taylor expanded in c around inf 69.7%
fma-define69.7%
associate-/r*69.8%
Simplified69.8%
if 1.29999999999999997e-217 < b Initial program 73.4%
Simplified73.2%
Taylor expanded in a around 0 83.7%
associate-*r/83.7%
mul-1-neg83.7%
Simplified83.7%
add-cube-cbrt83.7%
pow383.7%
Applied egg-rr83.7%
Taylor expanded in c around inf 83.7%
rem-cube-cbrt83.7%
Simplified83.7%
Final simplification81.3%
(FPCore (a b c)
:precision binary64
(if (<= b -8.5e+58)
(if (>= b 0.0) (/ b (- a)) (/ c (- b)))
(if (>= b 0.0)
(/ (* 2.0 (- (* a (/ c b)) b)) (* a 2.0))
(/ (* c 2.0) (- (sqrt (- (* b b) (* c (* a 4.0)))) b)))))
double code(double a, double b, double c) {
double tmp_1;
if (b <= -8.5e+58) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = b / -a;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = (2.0 * ((a * (c / b)) - b)) / (a * 2.0);
} else {
tmp_1 = (c * 2.0) / (sqrt(((b * b) - (c * (a * 4.0)))) - b);
}
return tmp_1;
}
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
real(8) :: tmp_1
real(8) :: tmp_2
if (b <= (-8.5d+58)) then
if (b >= 0.0d0) then
tmp_2 = b / -a
else
tmp_2 = c / -b
end if
tmp_1 = tmp_2
else if (b >= 0.0d0) then
tmp_1 = (2.0d0 * ((a * (c / b)) - b)) / (a * 2.0d0)
else
tmp_1 = (c * 2.0d0) / (sqrt(((b * b) - (c * (a * 4.0d0)))) - b)
end if
code = tmp_1
end function
public static double code(double a, double b, double c) {
double tmp_1;
if (b <= -8.5e+58) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = b / -a;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = (2.0 * ((a * (c / b)) - b)) / (a * 2.0);
} else {
tmp_1 = (c * 2.0) / (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b);
}
return tmp_1;
}
def code(a, b, c): tmp_1 = 0 if b <= -8.5e+58: tmp_2 = 0 if b >= 0.0: tmp_2 = b / -a else: tmp_2 = c / -b tmp_1 = tmp_2 elif b >= 0.0: tmp_1 = (2.0 * ((a * (c / b)) - b)) / (a * 2.0) else: tmp_1 = (c * 2.0) / (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) return tmp_1
function code(a, b, c) tmp_1 = 0.0 if (b <= -8.5e+58) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = Float64(b / Float64(-a)); else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b >= 0.0) tmp_1 = Float64(Float64(2.0 * Float64(Float64(a * Float64(c / b)) - b)) / Float64(a * 2.0)); else tmp_1 = Float64(Float64(c * 2.0) / Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b)); end return tmp_1 end
function tmp_4 = code(a, b, c) tmp_2 = 0.0; if (b <= -8.5e+58) tmp_3 = 0.0; if (b >= 0.0) tmp_3 = b / -a; else tmp_3 = c / -b; end tmp_2 = tmp_3; elseif (b >= 0.0) tmp_2 = (2.0 * ((a * (c / b)) - b)) / (a * 2.0); else tmp_2 = (c * 2.0) / (sqrt(((b * b) - (c * (a * 4.0)))) - b); end tmp_4 = tmp_2; end
code[a_, b_, c_] := If[LessEqual[b, -8.5e+58], If[GreaterEqual[b, 0.0], N[(b / (-a)), $MachinePrecision], N[(c / (-b)), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[(N[(2.0 * N[(N[(a * N[(c / b), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * 2.0), $MachinePrecision] / N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+58}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\
\end{array}
\end{array}
if b < -8.50000000000000015e58Initial program 56.8%
Simplified57.1%
Taylor expanded in a around 0 57.1%
associate-*r/57.1%
mul-1-neg57.1%
Simplified57.1%
Taylor expanded in b around -inf 90.4%
Taylor expanded in b around 0 90.8%
neg-mul-190.8%
distribute-neg-frac90.8%
neg-mul-190.8%
distribute-frac-neg90.8%
Simplified90.8%
if -8.50000000000000015e58 < b Initial program 76.2%
Taylor expanded in a around 0 77.4%
distribute-lft-out--77.4%
associate-/l*78.0%
Simplified78.0%
Final simplification81.4%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (/ b (- a))))
(if (<= b -7.8e-55)
(if (>= b 0.0) t_0 (/ c (- b)))
(if (>= b 0.0) t_0 (/ (* c 2.0) (- (sqrt (* a (* c -4.0))) b))))))
double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -7.8e-55) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = (c * 2.0) / (sqrt((a * (c * -4.0))) - b);
}
return tmp_1;
}
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
real(8) :: tmp_1
real(8) :: tmp_2
t_0 = b / -a
if (b <= (-7.8d-55)) then
if (b >= 0.0d0) then
tmp_2 = t_0
else
tmp_2 = c / -b
end if
tmp_1 = tmp_2
else if (b >= 0.0d0) then
tmp_1 = t_0
else
tmp_1 = (c * 2.0d0) / (sqrt((a * (c * (-4.0d0)))) - b)
end if
code = tmp_1
end function
public static double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -7.8e-55) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = (c * 2.0) / (Math.sqrt((a * (c * -4.0))) - b);
}
return tmp_1;
}
def code(a, b, c): t_0 = b / -a tmp_1 = 0 if b <= -7.8e-55: tmp_2 = 0 if b >= 0.0: tmp_2 = t_0 else: tmp_2 = c / -b tmp_1 = tmp_2 elif b >= 0.0: tmp_1 = t_0 else: tmp_1 = (c * 2.0) / (math.sqrt((a * (c * -4.0))) - b) return tmp_1
function code(a, b, c) t_0 = Float64(b / Float64(-a)) tmp_1 = 0.0 if (b <= -7.8e-55) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = t_0; else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b >= 0.0) tmp_1 = t_0; else tmp_1 = Float64(Float64(c * 2.0) / Float64(sqrt(Float64(a * Float64(c * -4.0))) - b)); end return tmp_1 end
function tmp_4 = code(a, b, c) t_0 = b / -a; tmp_2 = 0.0; if (b <= -7.8e-55) tmp_3 = 0.0; if (b >= 0.0) tmp_3 = t_0; else tmp_3 = c / -b; end tmp_2 = tmp_3; elseif (b >= 0.0) tmp_2 = t_0; else tmp_2 = (c * 2.0) / (sqrt((a * (c * -4.0))) - b); end tmp_4 = tmp_2; end
code[a_, b_, c_] := Block[{t$95$0 = N[(b / (-a)), $MachinePrecision]}, If[LessEqual[b, -7.8e-55], If[GreaterEqual[b, 0.0], t$95$0, N[(c / (-b)), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$0, N[(N[(c * 2.0), $MachinePrecision] / N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{b}{-a}\\
\mathbf{if}\;b \leq -7.8 \cdot 10^{-55}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\sqrt{a \cdot \left(c \cdot -4\right)} - b}\\
\end{array}
\end{array}
if b < -7.8e-55Initial program 64.7%
Simplified64.8%
Taylor expanded in a around 0 64.8%
associate-*r/64.8%
mul-1-neg64.8%
Simplified64.8%
Taylor expanded in b around -inf 80.9%
Taylor expanded in b around 0 81.2%
neg-mul-181.2%
distribute-neg-frac81.2%
neg-mul-181.2%
distribute-frac-neg81.2%
Simplified81.2%
if -7.8e-55 < b Initial program 74.8%
Simplified74.6%
Taylor expanded in a around 0 76.7%
associate-*r/76.7%
mul-1-neg76.7%
Simplified76.7%
add-cube-cbrt76.6%
pow376.6%
Applied egg-rr76.6%
Taylor expanded in c around inf 73.7%
Taylor expanded in c around 0 73.8%
associate-*r/73.8%
*-commutative73.8%
rem-cube-cbrt73.9%
Simplified73.9%
Final simplification76.5%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (/ b (- a))))
(if (<= b -7e-56)
(if (>= b 0.0) t_0 (/ c (- b)))
(if (>= b 0.0) t_0 (* c (/ 2.0 (- (sqrt (* a (* c -4.0))) b)))))))
double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -7e-56) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = c * (2.0 / (sqrt((a * (c * -4.0))) - b));
}
return tmp_1;
}
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
real(8) :: tmp_1
real(8) :: tmp_2
t_0 = b / -a
if (b <= (-7d-56)) then
if (b >= 0.0d0) then
tmp_2 = t_0
else
tmp_2 = c / -b
end if
tmp_1 = tmp_2
else if (b >= 0.0d0) then
tmp_1 = t_0
else
tmp_1 = c * (2.0d0 / (sqrt((a * (c * (-4.0d0)))) - b))
end if
code = tmp_1
end function
public static double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -7e-56) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = c * (2.0 / (Math.sqrt((a * (c * -4.0))) - b));
}
return tmp_1;
}
def code(a, b, c): t_0 = b / -a tmp_1 = 0 if b <= -7e-56: tmp_2 = 0 if b >= 0.0: tmp_2 = t_0 else: tmp_2 = c / -b tmp_1 = tmp_2 elif b >= 0.0: tmp_1 = t_0 else: tmp_1 = c * (2.0 / (math.sqrt((a * (c * -4.0))) - b)) return tmp_1
function code(a, b, c) t_0 = Float64(b / Float64(-a)) tmp_1 = 0.0 if (b <= -7e-56) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = t_0; else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b >= 0.0) tmp_1 = t_0; else tmp_1 = Float64(c * Float64(2.0 / Float64(sqrt(Float64(a * Float64(c * -4.0))) - b))); end return tmp_1 end
function tmp_4 = code(a, b, c) t_0 = b / -a; tmp_2 = 0.0; if (b <= -7e-56) tmp_3 = 0.0; if (b >= 0.0) tmp_3 = t_0; else tmp_3 = c / -b; end tmp_2 = tmp_3; elseif (b >= 0.0) tmp_2 = t_0; else tmp_2 = c * (2.0 / (sqrt((a * (c * -4.0))) - b)); end tmp_4 = tmp_2; end
code[a_, b_, c_] := Block[{t$95$0 = N[(b / (-a)), $MachinePrecision]}, If[LessEqual[b, -7e-56], If[GreaterEqual[b, 0.0], t$95$0, N[(c / (-b)), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$0, N[(c * N[(2.0 / N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{b}{-a}\\
\mathbf{if}\;b \leq -7 \cdot 10^{-56}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{2}{\sqrt{a \cdot \left(c \cdot -4\right)} - b}\\
\end{array}
\end{array}
if b < -6.9999999999999996e-56Initial program 64.7%
Simplified64.8%
Taylor expanded in a around 0 64.8%
associate-*r/64.8%
mul-1-neg64.8%
Simplified64.8%
Taylor expanded in b around -inf 80.9%
Taylor expanded in b around 0 81.2%
neg-mul-181.2%
distribute-neg-frac81.2%
neg-mul-181.2%
distribute-frac-neg81.2%
Simplified81.2%
if -6.9999999999999996e-56 < b Initial program 74.8%
Simplified74.6%
Taylor expanded in a around 0 76.7%
associate-*r/76.7%
mul-1-neg76.7%
Simplified76.7%
add-cube-cbrt76.6%
pow376.6%
Applied egg-rr76.6%
Taylor expanded in c around inf 73.7%
rem-cube-cbrt73.8%
Simplified73.8%
Final simplification76.5%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (/ b (- a))))
(if (<= b -4.6e-68)
(if (>= b 0.0) t_0 (/ c (- b)))
(if (>= b 0.0) t_0 (* c (/ 2.0 (sqrt (* a (* c -4.0)))))))))
double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -4.6e-68) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = c * (2.0 / sqrt((a * (c * -4.0))));
}
return tmp_1;
}
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
real(8) :: tmp_1
real(8) :: tmp_2
t_0 = b / -a
if (b <= (-4.6d-68)) then
if (b >= 0.0d0) then
tmp_2 = t_0
else
tmp_2 = c / -b
end if
tmp_1 = tmp_2
else if (b >= 0.0d0) then
tmp_1 = t_0
else
tmp_1 = c * (2.0d0 / sqrt((a * (c * (-4.0d0)))))
end if
code = tmp_1
end function
public static double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -4.6e-68) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = c * (2.0 / Math.sqrt((a * (c * -4.0))));
}
return tmp_1;
}
def code(a, b, c): t_0 = b / -a tmp_1 = 0 if b <= -4.6e-68: tmp_2 = 0 if b >= 0.0: tmp_2 = t_0 else: tmp_2 = c / -b tmp_1 = tmp_2 elif b >= 0.0: tmp_1 = t_0 else: tmp_1 = c * (2.0 / math.sqrt((a * (c * -4.0)))) return tmp_1
function code(a, b, c) t_0 = Float64(b / Float64(-a)) tmp_1 = 0.0 if (b <= -4.6e-68) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = t_0; else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b >= 0.0) tmp_1 = t_0; else tmp_1 = Float64(c * Float64(2.0 / sqrt(Float64(a * Float64(c * -4.0))))); end return tmp_1 end
function tmp_4 = code(a, b, c) t_0 = b / -a; tmp_2 = 0.0; if (b <= -4.6e-68) tmp_3 = 0.0; if (b >= 0.0) tmp_3 = t_0; else tmp_3 = c / -b; end tmp_2 = tmp_3; elseif (b >= 0.0) tmp_2 = t_0; else tmp_2 = c * (2.0 / sqrt((a * (c * -4.0)))); end tmp_4 = tmp_2; end
code[a_, b_, c_] := Block[{t$95$0 = N[(b / (-a)), $MachinePrecision]}, If[LessEqual[b, -4.6e-68], If[GreaterEqual[b, 0.0], t$95$0, N[(c / (-b)), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$0, N[(c * N[(2.0 / N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{b}{-a}\\
\mathbf{if}\;b \leq -4.6 \cdot 10^{-68}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{2}{\sqrt{a \cdot \left(c \cdot -4\right)}}\\
\end{array}
\end{array}
if b < -4.59999999999999994e-68Initial program 65.5%
Simplified65.5%
Taylor expanded in a around 0 65.5%
associate-*r/65.5%
mul-1-neg65.5%
Simplified65.5%
Taylor expanded in b around -inf 80.3%
Taylor expanded in b around 0 80.6%
neg-mul-180.6%
distribute-neg-frac80.6%
neg-mul-180.6%
distribute-frac-neg80.6%
Simplified80.6%
if -4.59999999999999994e-68 < b Initial program 74.5%
Simplified74.3%
Taylor expanded in a around 0 76.5%
associate-*r/76.5%
mul-1-neg76.5%
Simplified76.5%
add-cube-cbrt76.3%
pow376.3%
Applied egg-rr76.3%
Taylor expanded in c around inf 73.9%
Taylor expanded in a around inf 73.1%
rem-cube-cbrt73.1%
Simplified73.1%
Final simplification75.9%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (/ b (- a))))
(if (<= b -1.18e-197)
(if (>= b 0.0) t_0 (/ c (- b)))
(if (>= b 0.0) t_0 (* 2.0 (sqrt (/ c (* a -4.0))))))))
double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -1.18e-197) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = 2.0 * sqrt((c / (a * -4.0)));
}
return tmp_1;
}
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
real(8) :: tmp_1
real(8) :: tmp_2
t_0 = b / -a
if (b <= (-1.18d-197)) then
if (b >= 0.0d0) then
tmp_2 = t_0
else
tmp_2 = c / -b
end if
tmp_1 = tmp_2
else if (b >= 0.0d0) then
tmp_1 = t_0
else
tmp_1 = 2.0d0 * sqrt((c / (a * (-4.0d0))))
end if
code = tmp_1
end function
public static double code(double a, double b, double c) {
double t_0 = b / -a;
double tmp_1;
if (b <= -1.18e-197) {
double tmp_2;
if (b >= 0.0) {
tmp_2 = t_0;
} else {
tmp_2 = c / -b;
}
tmp_1 = tmp_2;
} else if (b >= 0.0) {
tmp_1 = t_0;
} else {
tmp_1 = 2.0 * Math.sqrt((c / (a * -4.0)));
}
return tmp_1;
}
def code(a, b, c): t_0 = b / -a tmp_1 = 0 if b <= -1.18e-197: tmp_2 = 0 if b >= 0.0: tmp_2 = t_0 else: tmp_2 = c / -b tmp_1 = tmp_2 elif b >= 0.0: tmp_1 = t_0 else: tmp_1 = 2.0 * math.sqrt((c / (a * -4.0))) return tmp_1
function code(a, b, c) t_0 = Float64(b / Float64(-a)) tmp_1 = 0.0 if (b <= -1.18e-197) tmp_2 = 0.0 if (b >= 0.0) tmp_2 = t_0; else tmp_2 = Float64(c / Float64(-b)); end tmp_1 = tmp_2; elseif (b >= 0.0) tmp_1 = t_0; else tmp_1 = Float64(2.0 * sqrt(Float64(c / Float64(a * -4.0)))); end return tmp_1 end
function tmp_4 = code(a, b, c) t_0 = b / -a; tmp_2 = 0.0; if (b <= -1.18e-197) tmp_3 = 0.0; if (b >= 0.0) tmp_3 = t_0; else tmp_3 = c / -b; end tmp_2 = tmp_3; elseif (b >= 0.0) tmp_2 = t_0; else tmp_2 = 2.0 * sqrt((c / (a * -4.0))); end tmp_4 = tmp_2; end
code[a_, b_, c_] := Block[{t$95$0 = N[(b / (-a)), $MachinePrecision]}, If[LessEqual[b, -1.18e-197], If[GreaterEqual[b, 0.0], t$95$0, N[(c / (-b)), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$0, N[(2.0 * N[Sqrt[N[(c / N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{b}{-a}\\
\mathbf{if}\;b \leq -1.18 \cdot 10^{-197}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \sqrt{\frac{c}{a \cdot -4}}\\
\end{array}
\end{array}
if b < -1.17999999999999995e-197Initial program 67.9%
Simplified67.9%
Taylor expanded in a around 0 67.9%
associate-*r/67.9%
mul-1-neg67.9%
Simplified67.9%
Taylor expanded in b around -inf 70.9%
Taylor expanded in b around 0 71.1%
neg-mul-171.1%
distribute-neg-frac71.1%
neg-mul-171.1%
distribute-frac-neg71.1%
Simplified71.1%
if -1.17999999999999995e-197 < b Initial program 73.9%
Simplified73.7%
Taylor expanded in a around 0 76.3%
associate-*r/76.3%
mul-1-neg76.3%
Simplified76.3%
add-cube-cbrt76.2%
pow376.2%
Applied egg-rr76.2%
Taylor expanded in c around inf 73.5%
rem-cube-cbrt73.5%
Simplified73.5%
Final simplification72.4%
(FPCore (a b c) :precision binary64 (if (>= b 0.0) (/ b (- a)) (/ c (- b))))
double code(double a, double b, double c) {
double tmp;
if (b >= 0.0) {
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 >= 0.0d0) 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 >= 0.0) {
tmp = b / -a;
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b >= 0.0: tmp = b / -a else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b >= 0.0) tmp = Float64(b / Float64(-a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b >= 0.0) tmp = b / -a; else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(b / (-a)), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
Initial program 71.1%
Simplified71.0%
Taylor expanded in a around 0 72.4%
associate-*r/72.4%
mul-1-neg72.4%
Simplified72.4%
Taylor expanded in b around -inf 69.7%
Taylor expanded in b around 0 69.8%
neg-mul-169.8%
distribute-neg-frac69.8%
neg-mul-169.8%
distribute-frac-neg69.8%
Simplified69.8%
Final simplification69.8%
herbie shell --seed 2024154
(FPCore (a b c)
:name "jeff quadratic root 1"
:precision binary64
(if (>= b 0.0) (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)) (/ (* 2.0 c) (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))))))