
(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 6 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+129)
(- (/ c b) (/ b a))
(if (<= b 4.9e-89)
(/ (- (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+129) {
tmp = (c / b) - (b / a);
} else if (b <= 4.9e-89) {
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+129)) then
tmp = (c / b) - (b / a)
else if (b <= 4.9d-89) 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+129) {
tmp = (c / b) - (b / a);
} else if (b <= 4.9e-89) {
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+129: tmp = (c / b) - (b / a) elif b <= 4.9e-89: 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+129) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 4.9e-89) 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+129) tmp = (c / b) - (b / a); elseif (b <= 4.9e-89) 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+129], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.9e-89], 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^{+129}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 4.9 \cdot 10^{-89}:\\
\;\;\;\;\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 < -2e129Initial program 45.6%
neg-sub045.6%
associate-+l-45.6%
sub0-neg45.6%
neg-mul-145.6%
associate-*l/45.6%
*-commutative45.6%
associate-/r*45.6%
/-rgt-identity45.6%
metadata-eval45.6%
Simplified45.7%
Taylor expanded in b around -inf 94.1%
mul-1-neg94.1%
unsub-neg94.1%
Simplified94.1%
if -2e129 < b < 4.9e-89Initial program 83.0%
if 4.9e-89 < b Initial program 14.7%
neg-sub014.7%
associate-+l-14.7%
sub0-neg14.7%
neg-mul-114.7%
associate-*l/14.7%
*-commutative14.7%
associate-/r*14.7%
/-rgt-identity14.7%
metadata-eval14.7%
Simplified14.7%
Taylor expanded in b around inf 87.2%
mul-1-neg87.2%
distribute-neg-frac87.2%
Simplified87.2%
Final simplification86.7%
(FPCore (a b c)
:precision binary64
(if (<= b -1.65e-106)
(- (/ c b) (/ b a))
(if (<= b 5.1e-89)
(/ (- (sqrt (* a (* c -4.0))) b) (* a 2.0))
(/ (- c) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.65e-106) {
tmp = (c / b) - (b / a);
} else if (b <= 5.1e-89) {
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 <= (-1.65d-106)) then
tmp = (c / b) - (b / a)
else if (b <= 5.1d-89) 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 <= -1.65e-106) {
tmp = (c / b) - (b / a);
} else if (b <= 5.1e-89) {
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 <= -1.65e-106: tmp = (c / b) - (b / a) elif b <= 5.1e-89: 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 <= -1.65e-106) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 5.1e-89) 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 <= -1.65e-106) tmp = (c / b) - (b / a); elseif (b <= 5.1e-89) 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, -1.65e-106], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e-89], 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 -1.65 \cdot 10^{-106}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 5.1 \cdot 10^{-89}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -4\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{b}\\
\end{array}
\end{array}
if b < -1.65000000000000008e-106Initial program 65.0%
neg-sub065.0%
associate-+l-65.0%
sub0-neg65.0%
neg-mul-165.0%
associate-*l/64.8%
*-commutative64.8%
associate-/r*64.8%
/-rgt-identity64.8%
metadata-eval64.8%
Simplified64.9%
Taylor expanded in b around -inf 82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
if -1.65000000000000008e-106 < b < 5.10000000000000004e-89Initial program 80.2%
Taylor expanded in b around 0 80.2%
*-commutative80.2%
*-commutative80.2%
associate-*r*80.2%
Simplified80.2%
if 5.10000000000000004e-89 < b Initial program 14.7%
neg-sub014.7%
associate-+l-14.7%
sub0-neg14.7%
neg-mul-114.7%
associate-*l/14.7%
*-commutative14.7%
associate-/r*14.7%
/-rgt-identity14.7%
metadata-eval14.7%
Simplified14.7%
Taylor expanded in b around inf 87.2%
mul-1-neg87.2%
distribute-neg-frac87.2%
Simplified87.2%
Final simplification83.9%
(FPCore (a b c) :precision binary64 (if (<= b 7.8e+67) (/ (- b) a) (/ c b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 7.8e+67) {
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 <= 7.8d+67) 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 <= 7.8e+67) {
tmp = -b / a;
} else {
tmp = c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 7.8e+67: tmp = -b / a else: tmp = c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 7.8e+67) 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 <= 7.8e+67) tmp = -b / a; else tmp = c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 7.8e+67], N[((-b) / a), $MachinePrecision], N[(c / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{-b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b}\\
\end{array}
\end{array}
if b < 7.80000000000000013e67Initial program 64.6%
neg-sub064.6%
associate-+l-64.6%
sub0-neg64.6%
neg-mul-164.6%
associate-*l/64.5%
*-commutative64.5%
associate-/r*64.5%
/-rgt-identity64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in b around -inf 41.8%
associate-*r/41.8%
mul-1-neg41.8%
Simplified41.8%
if 7.80000000000000013e67 < b Initial program 9.8%
Taylor expanded in b around -inf 2.4%
Taylor expanded in c around inf 35.5%
Final simplification40.0%
(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 68.0%
neg-sub068.0%
associate-+l-68.0%
sub0-neg68.0%
neg-mul-168.0%
associate-*l/67.8%
*-commutative67.8%
associate-/r*67.8%
/-rgt-identity67.8%
metadata-eval67.8%
Simplified67.9%
Taylor expanded in b around -inf 62.7%
associate-*r/62.7%
mul-1-neg62.7%
Simplified62.7%
if -4.999999999999985e-310 < b Initial program 32.8%
neg-sub032.8%
associate-+l-32.8%
sub0-neg32.8%
neg-mul-132.8%
associate-*l/32.8%
*-commutative32.8%
associate-/r*32.8%
/-rgt-identity32.8%
metadata-eval32.8%
Simplified32.8%
Taylor expanded in b around inf 66.9%
mul-1-neg66.9%
distribute-neg-frac66.9%
Simplified66.9%
Final simplification64.9%
(FPCore (a b c) :precision binary64 (if (<= b -1.9e+46) (/ 1.0 0.0) (/ c b)))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.9e+46) {
tmp = 1.0 / 0.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 <= (-1.9d+46)) then
tmp = 1.0d0 / 0.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 <= -1.9e+46) {
tmp = 1.0 / 0.0;
} else {
tmp = c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.9e+46: tmp = 1.0 / 0.0 else: tmp = c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.9e+46) tmp = Float64(1.0 / 0.0); else tmp = Float64(c / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.9e+46) tmp = 1.0 / 0.0; else tmp = c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.9e+46], N[(1.0 / 0.0), $MachinePrecision], N[(c / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{+46}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b}\\
\end{array}
\end{array}
if b < -1.9e46Initial program 57.9%
neg-sub057.9%
associate-+l-57.9%
sub0-neg57.9%
neg-mul-157.9%
associate-*l/57.7%
*-commutative57.7%
associate-/r*57.7%
/-rgt-identity57.7%
metadata-eval57.7%
Simplified57.8%
associate-*r/58.0%
clear-num57.9%
Applied egg-rr57.9%
fma-udef57.8%
*-commutative57.8%
associate-*r*57.8%
metadata-eval57.8%
distribute-rgt-neg-in57.8%
*-commutative57.8%
distribute-lft-neg-in57.8%
+-commutative57.8%
sub-neg57.8%
add-sqr-sqrt57.7%
pow257.7%
Applied egg-rr57.9%
Taylor expanded in b around -inf 18.9%
distribute-rgt-out0.3%
metadata-eval0.3%
mul0-rgt18.9%
Simplified18.9%
if -1.9e46 < b Initial program 46.4%
Taylor expanded in b around -inf 10.5%
Taylor expanded in c around inf 15.1%
Final simplification16.0%
(FPCore (a b c) :precision binary64 (/ 1.0 0.0))
double code(double a, double b, double c) {
return 1.0 / 0.0;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0 / 0.0d0
end function
public static double code(double a, double b, double c) {
return 1.0 / 0.0;
}
def code(a, b, c): return 1.0 / 0.0
function code(a, b, c) return Float64(1.0 / 0.0) end
function tmp = code(a, b, c) tmp = 1.0 / 0.0; end
code[a_, b_, c_] := N[(1.0 / 0.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{0}
\end{array}
Initial program 49.2%
neg-sub049.2%
associate-+l-49.2%
sub0-neg49.2%
neg-mul-149.2%
associate-*l/49.1%
*-commutative49.1%
associate-/r*49.1%
/-rgt-identity49.1%
metadata-eval49.1%
Simplified49.1%
associate-*r/49.2%
clear-num49.1%
Applied egg-rr49.1%
fma-udef49.1%
*-commutative49.1%
associate-*r*49.1%
metadata-eval49.1%
distribute-rgt-neg-in49.1%
*-commutative49.1%
distribute-lft-neg-in49.1%
+-commutative49.1%
sub-neg49.1%
add-sqr-sqrt47.2%
pow247.2%
Applied egg-rr47.2%
Taylor expanded in b around -inf 6.0%
distribute-rgt-out1.2%
metadata-eval1.2%
mul0-rgt6.2%
Simplified6.2%
Final simplification6.2%
(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))
(/ c (* 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 = (-b + t_0) / (2.0 * a);
} else {
tmp = c / (a * ((-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 = (-b + t_0) / (2.0d0 * a)
else
tmp = c / (a * ((-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 = (-b + t_0) / (2.0 * a);
} else {
tmp = c / (a * ((-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 = (-b + t_0) / (2.0 * a) else: tmp = c / (a * ((-b - t_0) / (2.0 * a))) 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(c / Float64(a * 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 = (-b + t_0) / (2.0 * a); else tmp = c / (a * ((-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[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Less[b, 0.0], N[(N[((-b) + t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(c / N[(a * N[(N[((-b) - t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
\mathbf{if}\;b < 0:\\
\;\;\;\;\frac{\left(-b\right) + t_0}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{a \cdot \frac{\left(-b\right) - t_0}{2 \cdot a}}\\
\end{array}
\end{array}
herbie shell --seed 2023195
(FPCore (a b c)
:name "The quadratic formula (r1)"
:precision binary64
:herbie-target
(if (< b 0.0) (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)) (/ c (* a (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))