
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.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) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \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) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.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) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}
(FPCore (a b c)
:precision binary64
(let* ((t_0 (* -0.5 (/ c b))))
(if (<= b -2.3e+145)
(- (* 0.6666666666666666 (/ (- b) a)) t_0)
(if (<= b 6.8e-19)
(/ (- (sqrt (- (* b b) (* 3.0 (* c a)))) b) (* a 3.0))
t_0))))
double code(double a, double b, double c) {
double t_0 = -0.5 * (c / b);
double tmp;
if (b <= -2.3e+145) {
tmp = (0.6666666666666666 * (-b / a)) - t_0;
} else if (b <= 6.8e-19) {
tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
} else {
tmp = 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 = (-0.5d0) * (c / b)
if (b <= (-2.3d+145)) then
tmp = (0.6666666666666666d0 * (-b / a)) - t_0
else if (b <= 6.8d-19) then
tmp = (sqrt(((b * b) - (3.0d0 * (c * a)))) - b) / (a * 3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = -0.5 * (c / b);
double tmp;
if (b <= -2.3e+145) {
tmp = (0.6666666666666666 * (-b / a)) - t_0;
} else if (b <= 6.8e-19) {
tmp = (Math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, c): t_0 = -0.5 * (c / b) tmp = 0 if b <= -2.3e+145: tmp = (0.6666666666666666 * (-b / a)) - t_0 elif b <= 6.8e-19: tmp = (math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0) else: tmp = t_0 return tmp
function code(a, b, c) t_0 = Float64(-0.5 * Float64(c / b)) tmp = 0.0 if (b <= -2.3e+145) tmp = Float64(Float64(0.6666666666666666 * Float64(Float64(-b) / a)) - t_0); elseif (b <= 6.8e-19) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(c * a)))) - b) / Float64(a * 3.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, c) t_0 = -0.5 * (c / b); tmp = 0.0; if (b <= -2.3e+145) tmp = (0.6666666666666666 * (-b / a)) - t_0; elseif (b <= 6.8e-19) tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0); else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.3e+145], N[(N[(0.6666666666666666 * N[((-b) / a), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[b, 6.8e-19], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.5 \cdot \frac{c}{b}\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+145}:\\
\;\;\;\;0.6666666666666666 \cdot \frac{-b}{a} - t\_0\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{-19}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < -2.3e145Initial program 44.8%
sqr-neg44.8%
sqr-neg44.8%
associate-*l*44.8%
Simplified44.8%
Taylor expanded in b around -inf 97.7%
Taylor expanded in c around 0 98.0%
if -2.3e145 < b < 6.8000000000000004e-19Initial program 83.7%
sqr-neg83.7%
sqr-neg83.7%
associate-*l*83.7%
Simplified83.7%
if 6.8000000000000004e-19 < b Initial program 18.6%
sqr-neg18.6%
sqr-neg18.6%
associate-*l*18.6%
Simplified18.6%
Taylor expanded in b around inf 89.9%
*-commutative89.9%
Simplified89.9%
Final simplification88.6%
(FPCore (a b c)
:precision binary64
(if (<= b -3e-71)
(/ (* b -2.0) (* a 3.0))
(if (<= b 6.6e-19)
(/ (- (sqrt (* a (* c -3.0))) b) (* a 3.0))
(* -0.5 (/ c b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -3e-71) {
tmp = (b * -2.0) / (a * 3.0);
} else if (b <= 6.6e-19) {
tmp = (sqrt((a * (c * -3.0))) - b) / (a * 3.0);
} else {
tmp = -0.5 * (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 <= (-3d-71)) then
tmp = (b * (-2.0d0)) / (a * 3.0d0)
else if (b <= 6.6d-19) then
tmp = (sqrt((a * (c * (-3.0d0)))) - b) / (a * 3.0d0)
else
tmp = (-0.5d0) * (c / b)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -3e-71) {
tmp = (b * -2.0) / (a * 3.0);
} else if (b <= 6.6e-19) {
tmp = (Math.sqrt((a * (c * -3.0))) - b) / (a * 3.0);
} else {
tmp = -0.5 * (c / b);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -3e-71: tmp = (b * -2.0) / (a * 3.0) elif b <= 6.6e-19: tmp = (math.sqrt((a * (c * -3.0))) - b) / (a * 3.0) else: tmp = -0.5 * (c / b) return tmp
function code(a, b, c) tmp = 0.0 if (b <= -3e-71) tmp = Float64(Float64(b * -2.0) / Float64(a * 3.0)); elseif (b <= 6.6e-19) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / Float64(a * 3.0)); else tmp = Float64(-0.5 * Float64(c / b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -3e-71) tmp = (b * -2.0) / (a * 3.0); elseif (b <= 6.6e-19) tmp = (sqrt((a * (c * -3.0))) - b) / (a * 3.0); else tmp = -0.5 * (c / b); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -3e-71], N[(N[(b * -2.0), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.6e-19], N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{-71}:\\
\;\;\;\;\frac{b \cdot -2}{a \cdot 3}\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{-19}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\
\end{array}
\end{array}
if b < -3.0000000000000001e-71Initial program 69.0%
sqr-neg69.0%
sqr-neg69.0%
associate-*l*69.0%
Simplified69.0%
Taylor expanded in b around -inf 91.0%
*-commutative91.0%
Simplified91.0%
if -3.0000000000000001e-71 < b < 6.5999999999999995e-19Initial program 76.5%
sqr-neg76.5%
sqr-neg76.5%
associate-*l*76.5%
Simplified76.5%
Taylor expanded in b around 0 70.6%
+-commutative70.6%
unsub-neg70.6%
*-commutative70.6%
associate-*r*70.7%
Applied egg-rr70.7%
if 6.5999999999999995e-19 < b Initial program 18.6%
sqr-neg18.6%
sqr-neg18.6%
associate-*l*18.6%
Simplified18.6%
Taylor expanded in b around inf 89.9%
*-commutative89.9%
Simplified89.9%
Final simplification84.8%
(FPCore (a b c) :precision binary64 (if (<= b 2.7e-254) (* b (/ -0.6666666666666666 a)) (* c (/ -0.5 b))))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = b * (-0.6666666666666666 / a);
} else {
tmp = c * (-0.5 / 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 <= 2.7d-254) then
tmp = b * ((-0.6666666666666666d0) / a)
else
tmp = c * ((-0.5d0) / b)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = b * (-0.6666666666666666 / a);
} else {
tmp = c * (-0.5 / b);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.7e-254: tmp = b * (-0.6666666666666666 / a) else: tmp = c * (-0.5 / b) return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.7e-254) tmp = Float64(b * Float64(-0.6666666666666666 / a)); else tmp = Float64(c * Float64(-0.5 / b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 2.7e-254) tmp = b * (-0.6666666666666666 / a); else tmp = c * (-0.5 / b); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.7e-254], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], N[(c * N[(-0.5 / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.7 \cdot 10^{-254}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{-0.5}{b}\\
\end{array}
\end{array}
if b < 2.70000000000000007e-254Initial program 75.3%
sqr-neg75.3%
sqr-neg75.3%
associate-*l*75.4%
Simplified75.4%
Taylor expanded in b around -inf 68.3%
*-commutative68.3%
Simplified68.3%
*-commutative68.3%
clear-num68.2%
un-div-inv68.2%
Applied egg-rr68.2%
associate-/r/68.3%
Simplified68.3%
if 2.70000000000000007e-254 < b Initial program 30.3%
sqr-neg30.3%
sqr-neg30.3%
associate-*l*30.3%
Simplified30.3%
Applied egg-rr34.7%
Taylor expanded in a around 0 34.7%
Taylor expanded in b around inf 0.0%
*-commutative0.0%
associate-/l*0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r/0.0%
unpow20.0%
rem-square-sqrt73.1%
metadata-eval73.1%
Simplified73.1%
Final simplification70.5%
(FPCore (a b c) :precision binary64 (if (<= b 2.7e-254) (* (/ b a) -0.6666666666666666) (* c (/ -0.5 b))))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = (b / a) * -0.6666666666666666;
} else {
tmp = c * (-0.5 / 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 <= 2.7d-254) then
tmp = (b / a) * (-0.6666666666666666d0)
else
tmp = c * ((-0.5d0) / b)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = (b / a) * -0.6666666666666666;
} else {
tmp = c * (-0.5 / b);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.7e-254: tmp = (b / a) * -0.6666666666666666 else: tmp = c * (-0.5 / b) return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.7e-254) tmp = Float64(Float64(b / a) * -0.6666666666666666); else tmp = Float64(c * Float64(-0.5 / b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 2.7e-254) tmp = (b / a) * -0.6666666666666666; else tmp = c * (-0.5 / b); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.7e-254], N[(N[(b / a), $MachinePrecision] * -0.6666666666666666), $MachinePrecision], N[(c * N[(-0.5 / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.7 \cdot 10^{-254}:\\
\;\;\;\;\frac{b}{a} \cdot -0.6666666666666666\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{-0.5}{b}\\
\end{array}
\end{array}
if b < 2.70000000000000007e-254Initial program 75.3%
sqr-neg75.3%
sqr-neg75.3%
associate-*l*75.4%
Simplified75.4%
Taylor expanded in b around -inf 68.3%
*-commutative68.3%
Simplified68.3%
if 2.70000000000000007e-254 < b Initial program 30.3%
sqr-neg30.3%
sqr-neg30.3%
associate-*l*30.3%
Simplified30.3%
Applied egg-rr34.7%
Taylor expanded in a around 0 34.7%
Taylor expanded in b around inf 0.0%
*-commutative0.0%
associate-/l*0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r/0.0%
unpow20.0%
rem-square-sqrt73.1%
metadata-eval73.1%
Simplified73.1%
Final simplification70.5%
(FPCore (a b c) :precision binary64 (if (<= b 2.7e-254) (* (/ b a) -0.6666666666666666) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = (b / a) * -0.6666666666666666;
} else {
tmp = -0.5 * (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 <= 2.7d-254) then
tmp = (b / a) * (-0.6666666666666666d0)
else
tmp = (-0.5d0) * (c / b)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = (b / a) * -0.6666666666666666;
} else {
tmp = -0.5 * (c / b);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.7e-254: tmp = (b / a) * -0.6666666666666666 else: tmp = -0.5 * (c / b) return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.7e-254) tmp = Float64(Float64(b / a) * -0.6666666666666666); else tmp = Float64(-0.5 * Float64(c / b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 2.7e-254) tmp = (b / a) * -0.6666666666666666; else tmp = -0.5 * (c / b); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.7e-254], N[(N[(b / a), $MachinePrecision] * -0.6666666666666666), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.7 \cdot 10^{-254}:\\
\;\;\;\;\frac{b}{a} \cdot -0.6666666666666666\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\
\end{array}
\end{array}
if b < 2.70000000000000007e-254Initial program 75.3%
sqr-neg75.3%
sqr-neg75.3%
associate-*l*75.4%
Simplified75.4%
Taylor expanded in b around -inf 68.3%
*-commutative68.3%
Simplified68.3%
if 2.70000000000000007e-254 < b Initial program 30.3%
sqr-neg30.3%
sqr-neg30.3%
associate-*l*30.3%
Simplified30.3%
Taylor expanded in b around inf 73.3%
*-commutative73.3%
Simplified73.3%
Final simplification70.6%
(FPCore (a b c) :precision binary64 (if (<= b 2.7e-254) (/ (* b -0.6666666666666666) a) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = (b * -0.6666666666666666) / a;
} else {
tmp = -0.5 * (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 <= 2.7d-254) then
tmp = (b * (-0.6666666666666666d0)) / a
else
tmp = (-0.5d0) * (c / b)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 2.7e-254) {
tmp = (b * -0.6666666666666666) / a;
} else {
tmp = -0.5 * (c / b);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.7e-254: tmp = (b * -0.6666666666666666) / a else: tmp = -0.5 * (c / b) return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.7e-254) tmp = Float64(Float64(b * -0.6666666666666666) / a); else tmp = Float64(-0.5 * Float64(c / b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 2.7e-254) tmp = (b * -0.6666666666666666) / a; else tmp = -0.5 * (c / b); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.7e-254], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.7 \cdot 10^{-254}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\
\end{array}
\end{array}
if b < 2.70000000000000007e-254Initial program 75.3%
sqr-neg75.3%
sqr-neg75.3%
associate-*l*75.4%
Simplified75.4%
Taylor expanded in b around -inf 68.3%
*-commutative68.3%
Simplified68.3%
associate-*l/68.3%
Applied egg-rr68.3%
if 2.70000000000000007e-254 < b Initial program 30.3%
sqr-neg30.3%
sqr-neg30.3%
associate-*l*30.3%
Simplified30.3%
Taylor expanded in b around inf 73.3%
*-commutative73.3%
Simplified73.3%
Final simplification70.6%
(FPCore (a b c) :precision binary64 (* c (/ -0.5 b)))
double code(double a, double b, double c) {
return c * (-0.5 / 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 * ((-0.5d0) / b)
end function
public static double code(double a, double b, double c) {
return c * (-0.5 / b);
}
def code(a, b, c): return c * (-0.5 / b)
function code(a, b, c) return Float64(c * Float64(-0.5 / b)) end
function tmp = code(a, b, c) tmp = c * (-0.5 / b); end
code[a_, b_, c_] := N[(c * N[(-0.5 / b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c \cdot \frac{-0.5}{b}
\end{array}
Initial program 54.2%
sqr-neg54.2%
sqr-neg54.2%
associate-*l*54.2%
Simplified54.2%
Applied egg-rr52.6%
Taylor expanded in a around 0 52.5%
Taylor expanded in b around inf 0.0%
*-commutative0.0%
associate-/l*0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r/0.0%
unpow20.0%
rem-square-sqrt35.3%
metadata-eval35.3%
Simplified35.3%
Final simplification35.3%
herbie shell --seed 2024115
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))