
(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 13 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
(if (<= b -2.3e+152)
(fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666)))
(if (<= b 9.2e-48)
(/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2.3e+152) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else if (b <= 9.2e-48) {
tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -2.3e+152) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); elseif (b <= 9.2e-48) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -2.3e+152], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.2e-48], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -2.29999999999999985e152Initial program 40.0%
/-rgt-identity40.0%
metadata-eval40.0%
associate-/r/40.0%
metadata-eval40.0%
metadata-eval40.0%
times-frac40.0%
*-commutative40.0%
times-frac40.0%
*-commutative40.0%
associate-/r*40.0%
associate-*l/40.0%
Simplified40.0%
div-inv40.0%
*-commutative40.0%
fma-udef40.0%
associate-*r*40.0%
add-sqr-sqrt26.3%
hypot-def57.5%
Applied egg-rr57.5%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt98.3%
metadata-eval98.3%
associate-*r/98.3%
fma-def98.3%
associate-/r/99.7%
Simplified99.7%
if -2.29999999999999985e152 < b < 9.2000000000000003e-48Initial program 81.1%
if 9.2000000000000003e-48 < b Initial program 15.8%
neg-sub015.8%
associate-+l-15.8%
sub0-neg15.8%
neg-mul-115.8%
associate-*r/15.8%
*-commutative15.8%
metadata-eval15.8%
metadata-eval15.8%
times-frac15.8%
*-commutative15.8%
times-frac15.7%
Simplified15.7%
Taylor expanded in b around inf 90.4%
Final simplification88.6%
(FPCore (a b c)
:precision binary64
(if (<= b -4.5e+35)
(fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666)))
(if (<= b 9e-48)
(* (- (sqrt (+ (* b b) (* a (* c -3.0)))) b) (/ 0.3333333333333333 a))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -4.5e+35) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else if (b <= 9e-48) {
tmp = (sqrt(((b * b) + (a * (c * -3.0)))) - b) * (0.3333333333333333 / a);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -4.5e+35) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); elseif (b <= 9e-48) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(a * Float64(c * -3.0)))) - b) * Float64(0.3333333333333333 / a)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -4.5e+35], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-48], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-48}:\\
\;\;\;\;\left(\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -4.4999999999999997e35Initial program 55.5%
/-rgt-identity55.5%
metadata-eval55.5%
associate-/r/55.5%
metadata-eval55.5%
metadata-eval55.5%
times-frac55.5%
*-commutative55.5%
times-frac55.5%
*-commutative55.5%
associate-/r*55.4%
associate-*l/55.4%
Simplified55.4%
div-inv55.4%
*-commutative55.4%
fma-udef55.4%
associate-*r*55.4%
add-sqr-sqrt36.2%
hypot-def58.7%
Applied egg-rr58.7%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt97.4%
metadata-eval97.4%
associate-*r/97.4%
fma-def97.4%
associate-/r/98.5%
Simplified98.5%
if -4.4999999999999997e35 < b < 8.99999999999999977e-48Initial program 77.5%
neg-sub077.5%
associate-+l-77.5%
sub0-neg77.5%
neg-mul-177.5%
associate-*r/77.5%
*-commutative77.5%
metadata-eval77.5%
metadata-eval77.5%
times-frac77.5%
*-commutative77.5%
times-frac77.4%
Simplified77.4%
fma-udef77.4%
Applied egg-rr77.4%
if 8.99999999999999977e-48 < b Initial program 15.8%
neg-sub015.8%
associate-+l-15.8%
sub0-neg15.8%
neg-mul-115.8%
associate-*r/15.8%
*-commutative15.8%
metadata-eval15.8%
metadata-eval15.8%
times-frac15.8%
*-commutative15.8%
times-frac15.7%
Simplified15.7%
Taylor expanded in b around inf 90.4%
Final simplification88.5%
(FPCore (a b c)
:precision binary64
(if (<= b -1.1e+152)
(fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666)))
(if (<= b 1.08e-47)
(/ (- (sqrt (- (* b b) (* 3.0 (* c a)))) b) (* a 3.0))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.1e+152) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else if (b <= 1.08e-47) {
tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -1.1e+152) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); elseif (b <= 1.08e-47) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(c * a)))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -1.1e+152], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.08e-47], 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], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{elif}\;b \leq 1.08 \cdot 10^{-47}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -1.0999999999999999e152Initial program 40.0%
/-rgt-identity40.0%
metadata-eval40.0%
associate-/r/40.0%
metadata-eval40.0%
metadata-eval40.0%
times-frac40.0%
*-commutative40.0%
times-frac40.0%
*-commutative40.0%
associate-/r*40.0%
associate-*l/40.0%
Simplified40.0%
div-inv40.0%
*-commutative40.0%
fma-udef40.0%
associate-*r*40.0%
add-sqr-sqrt26.3%
hypot-def57.5%
Applied egg-rr57.5%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt98.3%
metadata-eval98.3%
associate-*r/98.3%
fma-def98.3%
associate-/r/99.7%
Simplified99.7%
if -1.0999999999999999e152 < b < 1.08000000000000005e-47Initial program 81.1%
neg-sub081.1%
associate-+l-81.1%
sub0-neg81.1%
neg-mul-181.1%
associate-*r/81.1%
metadata-eval81.1%
metadata-eval81.1%
times-frac81.1%
*-commutative81.1%
times-frac81.0%
associate-*l/81.1%
Simplified81.0%
if 1.08000000000000005e-47 < b Initial program 15.8%
neg-sub015.8%
associate-+l-15.8%
sub0-neg15.8%
neg-mul-115.8%
associate-*r/15.8%
*-commutative15.8%
metadata-eval15.8%
metadata-eval15.8%
times-frac15.8%
*-commutative15.8%
times-frac15.7%
Simplified15.7%
Taylor expanded in b around inf 90.4%
Final simplification88.6%
(FPCore (a b c)
:precision binary64
(if (<= b -5.5e-137)
(fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666)))
(if (<= b 1.25e-47)
(* (/ 0.3333333333333333 a) (- (sqrt (* (* c a) -3.0)) b))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -5.5e-137) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else if (b <= 1.25e-47) {
tmp = (0.3333333333333333 / a) * (sqrt(((c * a) * -3.0)) - b);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -5.5e-137) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); elseif (b <= 1.25e-47) tmp = Float64(Float64(0.3333333333333333 / a) * Float64(sqrt(Float64(Float64(c * a) * -3.0)) - b)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -5.5e-137], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e-47], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[Sqrt[N[(N[(c * a), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{-47}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(c \cdot a\right) \cdot -3} - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -5.5000000000000003e-137Initial program 65.1%
/-rgt-identity65.1%
metadata-eval65.1%
associate-/r/65.1%
metadata-eval65.1%
metadata-eval65.1%
times-frac65.1%
*-commutative65.1%
times-frac65.1%
*-commutative65.1%
associate-/r*65.0%
associate-*l/65.0%
Simplified65.0%
div-inv64.9%
*-commutative64.9%
fma-udef64.9%
associate-*r*64.9%
add-sqr-sqrt42.2%
hypot-def58.0%
Applied egg-rr58.0%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt88.5%
metadata-eval88.5%
associate-*r/88.5%
fma-def88.5%
associate-/r/89.3%
Simplified89.3%
if -5.5000000000000003e-137 < b < 1.25000000000000003e-47Initial program 71.1%
neg-sub071.1%
associate-+l-71.1%
sub0-neg71.1%
neg-mul-171.1%
associate-*r/71.1%
*-commutative71.1%
metadata-eval71.1%
metadata-eval71.1%
times-frac71.1%
*-commutative71.1%
times-frac71.0%
Simplified70.9%
Taylor expanded in b around 0 66.9%
if 1.25000000000000003e-47 < b Initial program 15.8%
neg-sub015.8%
associate-+l-15.8%
sub0-neg15.8%
neg-mul-115.8%
associate-*r/15.8%
*-commutative15.8%
metadata-eval15.8%
metadata-eval15.8%
times-frac15.8%
*-commutative15.8%
times-frac15.7%
Simplified15.7%
Taylor expanded in b around inf 90.4%
Final simplification85.3%
(FPCore (a b c)
:precision binary64
(if (<= b -1.9e-137)
(fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666)))
(if (<= b 1.7e-47)
(* (/ 0.3333333333333333 a) (- (sqrt (* a (* c -3.0))) b))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.9e-137) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else if (b <= 1.7e-47) {
tmp = (0.3333333333333333 / a) * (sqrt((a * (c * -3.0))) - b);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -1.9e-137) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); elseif (b <= 1.7e-47) tmp = Float64(Float64(0.3333333333333333 / a) * Float64(sqrt(Float64(a * Float64(c * -3.0))) - b)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -1.9e-137], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-47], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-47}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -1.89999999999999999e-137Initial program 65.1%
/-rgt-identity65.1%
metadata-eval65.1%
associate-/r/65.1%
metadata-eval65.1%
metadata-eval65.1%
times-frac65.1%
*-commutative65.1%
times-frac65.1%
*-commutative65.1%
associate-/r*65.0%
associate-*l/65.0%
Simplified65.0%
div-inv64.9%
*-commutative64.9%
fma-udef64.9%
associate-*r*64.9%
add-sqr-sqrt42.2%
hypot-def58.0%
Applied egg-rr58.0%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt88.5%
metadata-eval88.5%
associate-*r/88.5%
fma-def88.5%
associate-/r/89.3%
Simplified89.3%
if -1.89999999999999999e-137 < b < 1.7000000000000001e-47Initial program 71.1%
neg-sub071.1%
associate-+l-71.1%
sub0-neg71.1%
neg-mul-171.1%
associate-*r/71.1%
*-commutative71.1%
metadata-eval71.1%
metadata-eval71.1%
times-frac71.1%
*-commutative71.1%
times-frac71.0%
Simplified70.9%
Taylor expanded in b around 0 66.9%
*-commutative66.9%
*-commutative66.9%
associate-*r*66.9%
Simplified66.9%
if 1.7000000000000001e-47 < b Initial program 15.8%
neg-sub015.8%
associate-+l-15.8%
sub0-neg15.8%
neg-mul-115.8%
associate-*r/15.8%
*-commutative15.8%
metadata-eval15.8%
metadata-eval15.8%
times-frac15.8%
*-commutative15.8%
times-frac15.7%
Simplified15.7%
Taylor expanded in b around inf 90.4%
Final simplification85.3%
(FPCore (a b c)
:precision binary64
(if (<= b -5.5e-137)
(fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666)))
(if (<= b 1.08e-47)
(/ (* 0.3333333333333333 (- (sqrt (* a (* c -3.0))) b)) a)
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -5.5e-137) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else if (b <= 1.08e-47) {
tmp = (0.3333333333333333 * (sqrt((a * (c * -3.0))) - b)) / a;
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -5.5e-137) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); elseif (b <= 1.08e-47) tmp = Float64(Float64(0.3333333333333333 * Float64(sqrt(Float64(a * Float64(c * -3.0))) - b)) / a); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -5.5e-137], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.08e-47], N[(N[(0.3333333333333333 * N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{elif}\;b \leq 1.08 \cdot 10^{-47}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -5.5000000000000003e-137Initial program 65.1%
/-rgt-identity65.1%
metadata-eval65.1%
associate-/r/65.1%
metadata-eval65.1%
metadata-eval65.1%
times-frac65.1%
*-commutative65.1%
times-frac65.1%
*-commutative65.1%
associate-/r*65.0%
associate-*l/65.0%
Simplified65.0%
div-inv64.9%
*-commutative64.9%
fma-udef64.9%
associate-*r*64.9%
add-sqr-sqrt42.2%
hypot-def58.0%
Applied egg-rr58.0%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt88.5%
metadata-eval88.5%
associate-*r/88.5%
fma-def88.5%
associate-/r/89.3%
Simplified89.3%
if -5.5000000000000003e-137 < b < 1.08000000000000005e-47Initial program 71.1%
neg-sub071.1%
associate-+l-71.1%
sub0-neg71.1%
neg-mul-171.1%
associate-*r/71.1%
*-commutative71.1%
metadata-eval71.1%
metadata-eval71.1%
times-frac71.1%
*-commutative71.1%
times-frac71.0%
Simplified70.9%
Taylor expanded in b around 0 66.9%
*-commutative66.9%
*-commutative66.9%
*-commutative66.9%
associate-*l*66.9%
Simplified66.9%
associate-*r/67.1%
associate-*r*67.0%
*-commutative67.0%
associate-*r*67.0%
Applied egg-rr67.0%
if 1.08000000000000005e-47 < b Initial program 15.8%
neg-sub015.8%
associate-+l-15.8%
sub0-neg15.8%
neg-mul-115.8%
associate-*r/15.8%
*-commutative15.8%
metadata-eval15.8%
metadata-eval15.8%
times-frac15.8%
*-commutative15.8%
times-frac15.7%
Simplified15.7%
Taylor expanded in b around inf 90.4%
Final simplification85.3%
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (fma 0.5 (/ c b) (/ b (/ a -0.6666666666666666))) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = fma(0.5, (c / b), (b / (a / -0.6666666666666666)));
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = fma(0.5, Float64(c / b), Float64(b / Float64(a / -0.6666666666666666))); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(0.5 * N[(c / b), $MachinePrecision] + N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{\frac{a}{-0.6666666666666666}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -4.999999999999985e-310Initial program 65.7%
/-rgt-identity65.7%
metadata-eval65.7%
associate-/r/65.7%
metadata-eval65.7%
metadata-eval65.7%
times-frac65.7%
*-commutative65.7%
times-frac65.7%
*-commutative65.7%
associate-/r*65.6%
associate-*l/65.6%
Simplified65.7%
div-inv65.6%
*-commutative65.6%
fma-udef65.6%
associate-*r*65.6%
add-sqr-sqrt46.0%
hypot-def61.4%
Applied egg-rr61.4%
Taylor expanded in b around -inf 0.0%
+-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt79.4%
metadata-eval79.4%
associate-*r/79.4%
fma-def79.4%
associate-/r/80.1%
Simplified80.1%
if -4.999999999999985e-310 < b Initial program 30.2%
neg-sub030.2%
associate-+l-30.2%
sub0-neg30.2%
neg-mul-130.2%
associate-*r/30.2%
*-commutative30.2%
metadata-eval30.2%
metadata-eval30.2%
times-frac30.2%
*-commutative30.2%
times-frac30.2%
Simplified30.1%
Taylor expanded in b around inf 72.7%
Final simplification76.3%
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (/ (* -0.3333333333333333 (+ (* -1.5 (/ c (/ b a))) (* b 2.0))) a) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (-0.3333333333333333 * ((-1.5 * (c / (b / a))) + (b * 2.0))) / a;
} else {
tmp = (c / b) * -0.5;
}
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 = ((-0.3333333333333333d0) * (((-1.5d0) * (c / (b / a))) + (b * 2.0d0))) / a
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (-0.3333333333333333 * ((-1.5 * (c / (b / a))) + (b * 2.0))) / a;
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-310: tmp = (-0.3333333333333333 * ((-1.5 * (c / (b / a))) + (b * 2.0))) / a else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = Float64(Float64(-0.3333333333333333 * Float64(Float64(-1.5 * Float64(c / Float64(b / a))) + Float64(b * 2.0))) / a); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-310) tmp = (-0.3333333333333333 * ((-1.5 * (c / (b / a))) + (b * 2.0))) / a; else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(-0.3333333333333333 * N[(N[(-1.5 * N[(c / N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(-1.5 \cdot \frac{c}{\frac{b}{a}} + b \cdot 2\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -4.999999999999985e-310Initial program 65.7%
/-rgt-identity65.7%
metadata-eval65.7%
associate-/r/65.7%
metadata-eval65.7%
metadata-eval65.7%
times-frac65.7%
*-commutative65.7%
times-frac65.7%
*-commutative65.7%
associate-/r*65.6%
associate-*l/65.6%
Simplified65.7%
Taylor expanded in b around -inf 74.4%
expm1-log1p-u71.9%
expm1-udef71.6%
associate-/l*74.7%
Applied egg-rr74.7%
expm1-def75.0%
expm1-log1p79.8%
Simplified79.8%
if -4.999999999999985e-310 < b Initial program 30.2%
neg-sub030.2%
associate-+l-30.2%
sub0-neg30.2%
neg-mul-130.2%
associate-*r/30.2%
*-commutative30.2%
metadata-eval30.2%
metadata-eval30.2%
times-frac30.2%
*-commutative30.2%
times-frac30.2%
Simplified30.1%
Taylor expanded in b around inf 72.7%
Final simplification76.2%
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b))) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else {
tmp = (c / b) * -0.5;
}
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 = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-310: tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b))); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-310) tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -4.999999999999985e-310Initial program 65.7%
neg-sub065.7%
associate-+l-65.7%
sub0-neg65.7%
neg-mul-165.7%
associate-*r/65.7%
*-commutative65.7%
metadata-eval65.7%
metadata-eval65.7%
times-frac65.7%
*-commutative65.7%
times-frac65.7%
Simplified65.7%
Taylor expanded in b around -inf 79.4%
if -4.999999999999985e-310 < b Initial program 30.2%
neg-sub030.2%
associate-+l-30.2%
sub0-neg30.2%
neg-mul-130.2%
associate-*r/30.2%
*-commutative30.2%
metadata-eval30.2%
metadata-eval30.2%
times-frac30.2%
*-commutative30.2%
times-frac30.2%
Simplified30.1%
Taylor expanded in b around inf 72.7%
Final simplification76.0%
(FPCore (a b c) :precision binary64 (if (<= b 1.45e-303) (/ (* b -2.0) (* a 3.0)) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.45e-303) {
tmp = (b * -2.0) / (a * 3.0);
} else {
tmp = (c / b) * -0.5;
}
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.45d-303) then
tmp = (b * (-2.0d0)) / (a * 3.0d0)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.45e-303) {
tmp = (b * -2.0) / (a * 3.0);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.45e-303: tmp = (b * -2.0) / (a * 3.0) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.45e-303) tmp = Float64(Float64(b * -2.0) / Float64(a * 3.0)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.45e-303) tmp = (b * -2.0) / (a * 3.0); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.45e-303], N[(N[(b * -2.0), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.45 \cdot 10^{-303}:\\
\;\;\;\;\frac{b \cdot -2}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < 1.45000000000000007e-303Initial program 66.0%
neg-sub066.0%
associate-+l-66.0%
sub0-neg66.0%
neg-mul-166.0%
associate-*r/66.0%
metadata-eval66.0%
metadata-eval66.0%
times-frac66.0%
*-commutative66.0%
times-frac66.0%
associate-*l/66.0%
Simplified66.0%
+-commutative66.0%
sub-neg66.0%
cancel-sign-sub-inv66.0%
metadata-eval66.0%
*-commutative66.0%
associate-*r*66.0%
add-sqr-sqrt46.5%
hypot-def61.9%
Applied egg-rr61.9%
Taylor expanded in b around -inf 78.7%
*-commutative78.7%
Simplified78.7%
if 1.45000000000000007e-303 < b Initial program 29.7%
neg-sub029.7%
associate-+l-29.7%
sub0-neg29.7%
neg-mul-129.7%
associate-*r/29.7%
*-commutative29.7%
metadata-eval29.7%
metadata-eval29.7%
times-frac29.7%
*-commutative29.7%
times-frac29.6%
Simplified29.6%
Taylor expanded in b around inf 73.3%
Final simplification75.9%
(FPCore (a b c) :precision binary64 (if (<= b 1.45e-303) (* -0.6666666666666666 (/ b a)) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.45e-303) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = (c / b) * -0.5;
}
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.45d-303) then
tmp = (-0.6666666666666666d0) * (b / a)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.45e-303) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.45e-303: tmp = -0.6666666666666666 * (b / a) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.45e-303) tmp = Float64(-0.6666666666666666 * Float64(b / a)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.45e-303) tmp = -0.6666666666666666 * (b / a); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.45e-303], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.45 \cdot 10^{-303}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < 1.45000000000000007e-303Initial program 66.0%
neg-sub066.0%
associate-+l-66.0%
sub0-neg66.0%
neg-mul-166.0%
associate-*r/66.0%
*-commutative66.0%
metadata-eval66.0%
metadata-eval66.0%
times-frac66.0%
*-commutative66.0%
times-frac66.0%
Simplified65.9%
Taylor expanded in b around -inf 78.0%
*-commutative78.0%
Simplified78.0%
if 1.45000000000000007e-303 < b Initial program 29.7%
neg-sub029.7%
associate-+l-29.7%
sub0-neg29.7%
neg-mul-129.7%
associate-*r/29.7%
*-commutative29.7%
metadata-eval29.7%
metadata-eval29.7%
times-frac29.7%
*-commutative29.7%
times-frac29.6%
Simplified29.6%
Taylor expanded in b around inf 73.3%
Final simplification75.6%
(FPCore (a b c) :precision binary64 (if (<= b 2.3e-302) (/ b (/ a -0.6666666666666666)) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.3e-302) {
tmp = b / (a / -0.6666666666666666);
} else {
tmp = (c / b) * -0.5;
}
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.3d-302) then
tmp = b / (a / (-0.6666666666666666d0))
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 2.3e-302) {
tmp = b / (a / -0.6666666666666666);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.3e-302: tmp = b / (a / -0.6666666666666666) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.3e-302) tmp = Float64(b / Float64(a / -0.6666666666666666)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 2.3e-302) tmp = b / (a / -0.6666666666666666); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.3e-302], N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.3 \cdot 10^{-302}:\\
\;\;\;\;\frac{b}{\frac{a}{-0.6666666666666666}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < 2.30000000000000002e-302Initial program 66.0%
/-rgt-identity66.0%
metadata-eval66.0%
associate-/r/66.0%
metadata-eval66.0%
metadata-eval66.0%
times-frac66.0%
*-commutative66.0%
times-frac66.0%
*-commutative66.0%
associate-/r*65.9%
associate-*l/65.9%
Simplified65.9%
div-inv65.8%
*-commutative65.8%
fma-udef65.8%
associate-*r*65.8%
add-sqr-sqrt46.4%
hypot-def61.7%
Applied egg-rr61.7%
Taylor expanded in b around -inf 78.0%
*-commutative78.0%
associate-/r/78.6%
Simplified78.6%
if 2.30000000000000002e-302 < b Initial program 29.7%
neg-sub029.7%
associate-+l-29.7%
sub0-neg29.7%
neg-mul-129.7%
associate-*r/29.7%
*-commutative29.7%
metadata-eval29.7%
metadata-eval29.7%
times-frac29.7%
*-commutative29.7%
times-frac29.6%
Simplified29.6%
Taylor expanded in b around inf 73.3%
Final simplification75.9%
(FPCore (a b c) :precision binary64 (* (/ c b) -0.5))
double code(double a, double b, double c) {
return (c / b) * -0.5;
}
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) * (-0.5d0)
end function
public static double code(double a, double b, double c) {
return (c / b) * -0.5;
}
def code(a, b, c): return (c / b) * -0.5
function code(a, b, c) return Float64(Float64(c / b) * -0.5) end
function tmp = code(a, b, c) tmp = (c / b) * -0.5; end
code[a_, b_, c_] := N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]
\begin{array}{l}
\\
\frac{c}{b} \cdot -0.5
\end{array}
Initial program 47.4%
neg-sub047.4%
associate-+l-47.4%
sub0-neg47.4%
neg-mul-147.4%
associate-*r/47.4%
*-commutative47.4%
metadata-eval47.4%
metadata-eval47.4%
times-frac47.4%
*-commutative47.4%
times-frac47.4%
Simplified47.3%
Taylor expanded in b around inf 38.7%
Final simplification38.7%
herbie shell --seed 2023238
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))