
(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 6 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 -24000000.0)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 5e+148)
(/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a))
0.0)))
double code(double a, double b, double c) {
double tmp;
if (b <= -24000000.0) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 5e+148) {
tmp = (sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
} else {
tmp = 0.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) :: tmp
if (b <= (-24000000.0d0)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 5d+148) then
tmp = (sqrt(((b * b) - ((3.0d0 * a) * c))) - b) / (3.0d0 * a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -24000000.0) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 5e+148) {
tmp = (Math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -24000000.0: tmp = (b * -2.0) / (3.0 * a) elif b <= 5e+148: tmp = (math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -24000000.0) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 5e+148) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -24000000.0) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 5e+148) tmp = (sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -24000000.0], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e+148], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -24000000:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+148}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < -2.4e7Initial program 64.7%
Taylor expanded in b around -inf 94.2%
*-commutative94.2%
Simplified94.2%
if -2.4e7 < b < 5.00000000000000024e148Initial program 76.6%
if 5.00000000000000024e148 < b Initial program 6.8%
Applied egg-rr0.8%
Taylor expanded in b around inf 2.0%
expm1-log1p-u0.9%
expm1-udef3.5%
Applied egg-rr3.5%
Taylor expanded in b around 0 100.0%
Final simplification84.6%
(FPCore (a b c)
:precision binary64
(if (<= b -2.9e-61)
(* b (/ -0.6666666666666666 a))
(if (<= b 1.12e-60)
(* 0.3333333333333333 (/ (+ b (sqrt (* c (* a -3.0)))) a))
0.0)))
double code(double a, double b, double c) {
double tmp;
if (b <= -2.9e-61) {
tmp = b * (-0.6666666666666666 / a);
} else if (b <= 1.12e-60) {
tmp = 0.3333333333333333 * ((b + sqrt((c * (a * -3.0)))) / a);
} else {
tmp = 0.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) :: tmp
if (b <= (-2.9d-61)) then
tmp = b * ((-0.6666666666666666d0) / a)
else if (b <= 1.12d-60) then
tmp = 0.3333333333333333d0 * ((b + sqrt((c * (a * (-3.0d0))))) / a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2.9e-61) {
tmp = b * (-0.6666666666666666 / a);
} else if (b <= 1.12e-60) {
tmp = 0.3333333333333333 * ((b + Math.sqrt((c * (a * -3.0)))) / a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2.9e-61: tmp = b * (-0.6666666666666666 / a) elif b <= 1.12e-60: tmp = 0.3333333333333333 * ((b + math.sqrt((c * (a * -3.0)))) / a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2.9e-61) tmp = Float64(b * Float64(-0.6666666666666666 / a)); elseif (b <= 1.12e-60) tmp = Float64(0.3333333333333333 * Float64(Float64(b + sqrt(Float64(c * Float64(a * -3.0)))) / a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2.9e-61) tmp = b * (-0.6666666666666666 / a); elseif (b <= 1.12e-60) tmp = 0.3333333333333333 * ((b + sqrt((c * (a * -3.0)))) / a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2.9e-61], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e-60], N[(0.3333333333333333 * N[(N[(b + N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{-61}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{-60}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{b + \sqrt{c \cdot \left(a \cdot -3\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < -2.8999999999999999e-61Initial program 70.5%
Applied egg-rr57.6%
sub-neg57.6%
distribute-rgt-out--57.6%
Simplified57.6%
expm1-log1p-u38.9%
Applied egg-rr38.9%
Taylor expanded in b around -inf 91.9%
metadata-eval91.9%
distribute-lft-neg-in91.9%
*-lft-identity91.9%
associate-*l/91.8%
associate-*r*91.8%
*-commutative91.8%
distribute-rgt-neg-in91.8%
associate-*r/91.9%
metadata-eval91.9%
distribute-neg-frac91.9%
metadata-eval91.9%
Simplified91.9%
if -2.8999999999999999e-61 < b < 1.12e-60Initial program 71.6%
Taylor expanded in b around 0 63.8%
associate-*r*63.8%
*-commutative63.8%
*-commutative63.8%
Simplified63.8%
*-un-lft-identity63.8%
times-frac63.8%
metadata-eval63.8%
+-commutative63.8%
add-sqr-sqrt37.3%
sqrt-unprod63.5%
sqr-neg63.5%
sqrt-unprod26.9%
add-sqr-sqrt62.7%
Applied egg-rr62.7%
if 1.12e-60 < b Initial program 49.4%
Applied egg-rr4.6%
Taylor expanded in b around inf 2.9%
expm1-log1p-u2.2%
expm1-udef8.4%
Applied egg-rr8.4%
Taylor expanded in b around 0 78.8%
Final simplification78.1%
(FPCore (a b c) :precision binary64 (if (<= b -1.9e-56) (* b (/ -0.6666666666666666 a)) (if (<= b 1.05e-60) (/ (- (sqrt (* a (* c -3.0))) b) (* 3.0 a)) 0.0)))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.9e-56) {
tmp = b * (-0.6666666666666666 / a);
} else if (b <= 1.05e-60) {
tmp = (sqrt((a * (c * -3.0))) - b) / (3.0 * a);
} else {
tmp = 0.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) :: tmp
if (b <= (-1.9d-56)) then
tmp = b * ((-0.6666666666666666d0) / a)
else if (b <= 1.05d-60) then
tmp = (sqrt((a * (c * (-3.0d0)))) - b) / (3.0d0 * a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.9e-56) {
tmp = b * (-0.6666666666666666 / a);
} else if (b <= 1.05e-60) {
tmp = (Math.sqrt((a * (c * -3.0))) - b) / (3.0 * a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.9e-56: tmp = b * (-0.6666666666666666 / a) elif b <= 1.05e-60: tmp = (math.sqrt((a * (c * -3.0))) - b) / (3.0 * a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.9e-56) tmp = Float64(b * Float64(-0.6666666666666666 / a)); elseif (b <= 1.05e-60) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / Float64(3.0 * a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.9e-56) tmp = b * (-0.6666666666666666 / a); elseif (b <= 1.05e-60) tmp = (sqrt((a * (c * -3.0))) - b) / (3.0 * a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.9e-56], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.05e-60], N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-56}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-60}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < -1.9000000000000001e-56Initial program 70.5%
Applied egg-rr57.6%
sub-neg57.6%
distribute-rgt-out--57.6%
Simplified57.6%
expm1-log1p-u38.9%
Applied egg-rr38.9%
Taylor expanded in b around -inf 91.9%
metadata-eval91.9%
distribute-lft-neg-in91.9%
*-lft-identity91.9%
associate-*l/91.8%
associate-*r*91.8%
*-commutative91.8%
distribute-rgt-neg-in91.8%
associate-*r/91.9%
metadata-eval91.9%
distribute-neg-frac91.9%
metadata-eval91.9%
Simplified91.9%
if -1.9000000000000001e-56 < b < 1.04999999999999996e-60Initial program 71.6%
Taylor expanded in b around 0 63.8%
associate-*r*63.8%
*-commutative63.8%
*-commutative63.8%
Simplified63.8%
+-commutative63.8%
unsub-neg63.8%
Applied egg-rr63.8%
associate-*r*63.8%
*-commutative63.8%
rem-square-sqrt0.0%
unpow20.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt63.8%
Simplified63.8%
if 1.04999999999999996e-60 < b Initial program 49.4%
Applied egg-rr4.6%
Taylor expanded in b around inf 2.9%
expm1-log1p-u2.2%
expm1-udef8.4%
Applied egg-rr8.4%
Taylor expanded in b around 0 78.8%
Final simplification78.5%
(FPCore (a b c) :precision binary64 (if (<= b -1.22e-57) (* b (/ -0.6666666666666666 a)) (if (<= b 8.6e-61) (/ (- (sqrt (* c (* a -3.0))) b) (* 3.0 a)) 0.0)))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.22e-57) {
tmp = b * (-0.6666666666666666 / a);
} else if (b <= 8.6e-61) {
tmp = (sqrt((c * (a * -3.0))) - b) / (3.0 * a);
} else {
tmp = 0.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) :: tmp
if (b <= (-1.22d-57)) then
tmp = b * ((-0.6666666666666666d0) / a)
else if (b <= 8.6d-61) then
tmp = (sqrt((c * (a * (-3.0d0)))) - b) / (3.0d0 * a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.22e-57) {
tmp = b * (-0.6666666666666666 / a);
} else if (b <= 8.6e-61) {
tmp = (Math.sqrt((c * (a * -3.0))) - b) / (3.0 * a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.22e-57: tmp = b * (-0.6666666666666666 / a) elif b <= 8.6e-61: tmp = (math.sqrt((c * (a * -3.0))) - b) / (3.0 * a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.22e-57) tmp = Float64(b * Float64(-0.6666666666666666 / a)); elseif (b <= 8.6e-61) tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(3.0 * a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.22e-57) tmp = b * (-0.6666666666666666 / a); elseif (b <= 8.6e-61) tmp = (sqrt((c * (a * -3.0))) - b) / (3.0 * a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.22e-57], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.6e-61], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.22 \cdot 10^{-57}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-61}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < -1.2200000000000001e-57Initial program 70.5%
Applied egg-rr57.6%
sub-neg57.6%
distribute-rgt-out--57.6%
Simplified57.6%
expm1-log1p-u38.9%
Applied egg-rr38.9%
Taylor expanded in b around -inf 91.9%
metadata-eval91.9%
distribute-lft-neg-in91.9%
*-lft-identity91.9%
associate-*l/91.8%
associate-*r*91.8%
*-commutative91.8%
distribute-rgt-neg-in91.8%
associate-*r/91.9%
metadata-eval91.9%
distribute-neg-frac91.9%
metadata-eval91.9%
Simplified91.9%
if -1.2200000000000001e-57 < b < 8.6000000000000007e-61Initial program 71.6%
Taylor expanded in b around 0 63.8%
associate-*r*63.8%
*-commutative63.8%
*-commutative63.8%
Simplified63.8%
+-commutative63.8%
unsub-neg63.8%
Applied egg-rr63.8%
if 8.6000000000000007e-61 < b Initial program 49.4%
Applied egg-rr4.6%
Taylor expanded in b around inf 2.9%
expm1-log1p-u2.2%
expm1-udef8.4%
Applied egg-rr8.4%
Taylor expanded in b around 0 78.8%
Final simplification78.5%
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (* b (/ -0.6666666666666666 a)) 0.0))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = b * (-0.6666666666666666 / a);
} else {
tmp = 0.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) :: tmp
if (b <= (-5d-310)) then
tmp = b * ((-0.6666666666666666d0) / a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = b * (-0.6666666666666666 / a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-310: tmp = b * (-0.6666666666666666 / a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = Float64(b * Float64(-0.6666666666666666 / a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-310) tmp = b * (-0.6666666666666666 / a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < -4.999999999999985e-310Initial program 72.6%
Applied egg-rr65.3%
sub-neg65.3%
distribute-rgt-out--65.3%
Simplified65.3%
expm1-log1p-u46.1%
Applied egg-rr46.1%
Taylor expanded in b around -inf 66.9%
metadata-eval66.9%
distribute-lft-neg-in66.9%
*-lft-identity66.9%
associate-*l/66.8%
associate-*r*66.8%
*-commutative66.8%
distribute-rgt-neg-in66.8%
associate-*r/66.9%
metadata-eval66.9%
distribute-neg-frac66.9%
metadata-eval66.9%
Simplified66.9%
if -4.999999999999985e-310 < b Initial program 54.2%
Applied egg-rr19.8%
Taylor expanded in b around inf 3.5%
expm1-log1p-u3.0%
expm1-udef7.9%
Applied egg-rr7.9%
Taylor expanded in b around 0 59.6%
Final simplification63.2%
(FPCore (a b c) :precision binary64 0.0)
double code(double a, double b, double c) {
return 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 = 0.0d0
end function
public static double code(double a, double b, double c) {
return 0.0;
}
def code(a, b, c): return 0.0
function code(a, b, c) return 0.0 end
function tmp = code(a, b, c) tmp = 0.0; end
code[a_, b_, c_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 63.3%
Applied egg-rr17.6%
Taylor expanded in b around inf 2.6%
expm1-log1p-u2.2%
expm1-udef4.8%
Applied egg-rr4.8%
Taylor expanded in b around 0 31.5%
Final simplification31.5%
herbie shell --seed 2024031
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))