
(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 8 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 -2e+151)
(/ b (- a))
(if (<= b 2.5e-80)
(/ (- (sqrt (- (* b b) (* (* a 4.0) c))) b) (* a 2.0))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e+151) {
tmp = b / -a;
} else if (b <= 2.5e-80) {
tmp = (sqrt(((b * b) - ((a * 4.0) * c))) - 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+151)) then
tmp = b / -a
else if (b <= 2.5d-80) then
tmp = (sqrt(((b * b) - ((a * 4.0d0) * c))) - 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+151) {
tmp = b / -a;
} else if (b <= 2.5e-80) {
tmp = (Math.sqrt(((b * b) - ((a * 4.0) * c))) - b) / (a * 2.0);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2e+151: tmp = b / -a elif b <= 2.5e-80: tmp = (math.sqrt(((b * b) - ((a * 4.0) * c))) - b) / (a * 2.0) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2e+151) tmp = Float64(b / Float64(-a)); elseif (b <= 2.5e-80) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 4.0) * c))) - b) / Float64(a * 2.0)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2e+151) tmp = b / -a; elseif (b <= 2.5e-80) tmp = (sqrt(((b * b) - ((a * 4.0) * c))) - b) / (a * 2.0); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2e+151], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 2.5e-80], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * c), $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^{+151}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -2.00000000000000003e151Initial program 54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in b around -inf 100.0%
mul-1-neg100.0%
distribute-neg-frac2100.0%
Simplified100.0%
if -2.00000000000000003e151 < b < 2.5e-80Initial program 85.4%
if 2.5e-80 < b Initial program 11.9%
*-commutative11.9%
Simplified11.9%
Taylor expanded in b around inf 88.7%
associate-*r/88.7%
mul-1-neg88.7%
Simplified88.7%
Final simplification89.0%
(FPCore (a b c)
:precision binary64
(if (<= b -1.75e-51)
(- (/ c b) (/ b a))
(if (<= b 2.05e-79)
(* (/ 0.5 a) (- (sqrt (* -4.0 (* a c))) b))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.75e-51) {
tmp = (c / b) - (b / a);
} else if (b <= 2.05e-79) {
tmp = (0.5 / a) * (sqrt((-4.0 * (a * c))) - b);
} 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 <= (-1.75d-51)) then
tmp = (c / b) - (b / a)
else if (b <= 2.05d-79) then
tmp = (0.5d0 / a) * (sqrt(((-4.0d0) * (a * c))) - b)
else
tmp = c / -b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.75e-51) {
tmp = (c / b) - (b / a);
} else if (b <= 2.05e-79) {
tmp = (0.5 / a) * (Math.sqrt((-4.0 * (a * c))) - b);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.75e-51: tmp = (c / b) - (b / a) elif b <= 2.05e-79: tmp = (0.5 / a) * (math.sqrt((-4.0 * (a * c))) - b) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.75e-51) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 2.05e-79) tmp = Float64(Float64(0.5 / a) * Float64(sqrt(Float64(-4.0 * Float64(a * c))) - b)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.75e-51) tmp = (c / b) - (b / a); elseif (b <= 2.05e-79) tmp = (0.5 / a) * (sqrt((-4.0 * (a * c))) - b); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.75e-51], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.05e-79], N[(N[(0.5 / a), $MachinePrecision] * N[(N[Sqrt[N[(-4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{-79}:\\
\;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right)} - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -1.7499999999999999e-51Initial program 76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in b around -inf 93.6%
mul-1-neg93.6%
distribute-rgt-neg-in93.6%
+-commutative93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
Taylor expanded in a around inf 93.8%
+-commutative93.8%
mul-1-neg93.8%
unsub-neg93.8%
Simplified93.8%
if -1.7499999999999999e-51 < b < 2.04999999999999997e-79Initial program 78.7%
*-commutative78.7%
Simplified78.7%
Applied egg-rr77.2%
sub-neg77.2%
distribute-rgt-out--77.2%
Simplified77.2%
Taylor expanded in a around inf 75.3%
if 2.04999999999999997e-79 < b Initial program 11.9%
*-commutative11.9%
Simplified11.9%
Taylor expanded in b around inf 88.7%
associate-*r/88.7%
mul-1-neg88.7%
Simplified88.7%
Final simplification87.1%
(FPCore (a b c)
:precision binary64
(if (<= b -8.5e-39)
(- (/ c b) (/ b a))
(if (<= b 1.5e-77)
(/ (- (sqrt (* c (* a -4.0))) b) (* a 2.0))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -8.5e-39) {
tmp = (c / b) - (b / a);
} else if (b <= 1.5e-77) {
tmp = (sqrt((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 <= (-8.5d-39)) then
tmp = (c / b) - (b / a)
else if (b <= 1.5d-77) then
tmp = (sqrt((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 <= -8.5e-39) {
tmp = (c / b) - (b / a);
} else if (b <= 1.5e-77) {
tmp = (Math.sqrt((c * (a * -4.0))) - b) / (a * 2.0);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -8.5e-39: tmp = (c / b) - (b / a) elif b <= 1.5e-77: tmp = (math.sqrt((c * (a * -4.0))) - b) / (a * 2.0) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -8.5e-39) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 1.5e-77) tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -4.0))) - b) / Float64(a * 2.0)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -8.5e-39) tmp = (c / b) - (b / a); elseif (b <= 1.5e-77) tmp = (sqrt((c * (a * -4.0))) - b) / (a * 2.0); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -8.5e-39], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e-77], N[(N[(N[Sqrt[N[(c * N[(a * -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 -8.5 \cdot 10^{-39}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -8.5000000000000005e-39Initial program 76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in b around -inf 93.6%
mul-1-neg93.6%
distribute-rgt-neg-in93.6%
+-commutative93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
Taylor expanded in a around inf 93.8%
+-commutative93.8%
mul-1-neg93.8%
unsub-neg93.8%
Simplified93.8%
if -8.5000000000000005e-39 < b < 1.50000000000000008e-77Initial program 78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in b around 0 75.3%
*-commutative75.3%
*-commutative75.3%
associate-*r*75.3%
Simplified75.3%
if 1.50000000000000008e-77 < b Initial program 11.9%
*-commutative11.9%
Simplified11.9%
Taylor expanded in b around inf 88.7%
associate-*r/88.7%
mul-1-neg88.7%
Simplified88.7%
Final simplification87.1%
(FPCore (a b c) :precision binary64 (if (<= b -1e-309) (- (/ c b) (/ b a)) (/ c (- b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1e-309) {
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 <= (-1d-309)) 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 <= -1e-309) {
tmp = (c / b) - (b / a);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1e-309: tmp = (c / b) - (b / a) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1e-309) tmp = Float64(Float64(c / b) - Float64(b / a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1e-309) tmp = (c / b) - (b / a); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1e-309], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -1.000000000000002e-309Initial program 78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in b around -inf 71.8%
mul-1-neg71.8%
distribute-rgt-neg-in71.8%
+-commutative71.8%
mul-1-neg71.8%
unsub-neg71.8%
Simplified71.8%
Taylor expanded in a around inf 72.9%
+-commutative72.9%
mul-1-neg72.9%
unsub-neg72.9%
Simplified72.9%
if -1.000000000000002e-309 < b Initial program 27.0%
*-commutative27.0%
Simplified27.0%
Taylor expanded in b around inf 68.1%
associate-*r/68.1%
mul-1-neg68.1%
Simplified68.1%
Final simplification70.4%
(FPCore (a b c) :precision binary64 (if (<= b 1e+69) (/ b (- a)) (/ c b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1e+69) {
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 <= 1d+69) 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 <= 1e+69) {
tmp = b / -a;
} else {
tmp = c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1e+69: tmp = b / -a else: tmp = c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1e+69) tmp = Float64(b / Float64(-a)); else tmp = Float64(c / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1e+69) tmp = b / -a; else tmp = c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1e+69], N[(b / (-a)), $MachinePrecision], N[(c / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 10^{+69}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b}\\
\end{array}
\end{array}
if b < 1.0000000000000001e69Initial program 68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in b around -inf 49.2%
mul-1-neg49.2%
distribute-neg-frac249.2%
Simplified49.2%
if 1.0000000000000001e69 < b Initial program 8.8%
*-commutative8.8%
Simplified8.8%
Taylor expanded in b around -inf 2.2%
mul-1-neg2.2%
distribute-rgt-neg-in2.2%
+-commutative2.2%
mul-1-neg2.2%
unsub-neg2.2%
Simplified2.2%
Taylor expanded in b around 0 39.8%
Final simplification46.6%
(FPCore (a b c) :precision binary64 (if (<= b 3.1e-292) (/ b (- a)) (/ c (- b))))
double code(double a, double b, double c) {
double tmp;
if (b <= 3.1e-292) {
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 <= 3.1d-292) 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 <= 3.1e-292) {
tmp = b / -a;
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 3.1e-292: tmp = b / -a else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 3.1e-292) 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 <= 3.1e-292) tmp = b / -a; else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 3.1e-292], N[(b / (-a)), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.1 \cdot 10^{-292}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < 3.0999999999999999e-292Initial program 78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in b around -inf 72.1%
mul-1-neg72.1%
distribute-neg-frac272.1%
Simplified72.1%
if 3.0999999999999999e-292 < b Initial program 27.2%
*-commutative27.2%
Simplified27.2%
Taylor expanded in b around inf 68.6%
associate-*r/68.6%
mul-1-neg68.6%
Simplified68.6%
Final simplification70.3%
(FPCore (a b c) :precision binary64 (/ b a))
double code(double a, double b, double c) {
return b / 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 / a
end function
public static double code(double a, double b, double c) {
return b / a;
}
def code(a, b, c): return b / a
function code(a, b, c) return Float64(b / a) end
function tmp = code(a, b, c) tmp = b / a; end
code[a_, b_, c_] := N[(b / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{a}
\end{array}
Initial program 51.6%
*-commutative51.6%
Simplified51.6%
Applied egg-rr30.8%
unpow-130.8%
*-commutative30.8%
*-lft-identity30.8%
times-frac30.8%
metadata-eval30.8%
Simplified30.8%
Taylor expanded in a around 0 2.4%
Final simplification2.4%
(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.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in b around -inf 35.3%
mul-1-neg35.3%
distribute-rgt-neg-in35.3%
+-commutative35.3%
mul-1-neg35.3%
unsub-neg35.3%
Simplified35.3%
Taylor expanded in b around 0 13.2%
Final simplification13.2%
herbie shell --seed 2024071
(FPCore (a b c)
:name "Quadratic roots, full range"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))