
(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 9 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 (* (* 0.3333333333333333 (/ (* (* c a) 3.0) (+ (sqrt (fma (* -3.0 a) c (* b b))) b))) (/ -1.0 a)))
double code(double a, double b, double c) {
return (0.3333333333333333 * (((c * a) * 3.0) / (sqrt(fma((-3.0 * a), c, (b * b))) + b))) * (-1.0 / a);
}
function code(a, b, c) return Float64(Float64(0.3333333333333333 * Float64(Float64(Float64(c * a) * 3.0) / Float64(sqrt(fma(Float64(-3.0 * a), c, Float64(b * b))) + b))) * Float64(-1.0 / a)) end
code[a_, b_, c_] := N[(N[(0.3333333333333333 * N[(N[(N[(c * a), $MachinePrecision] * 3.0), $MachinePrecision] / N[(N[Sqrt[N[(N[(-3.0 * a), $MachinePrecision] * c + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.3333333333333333 \cdot \frac{\left(c \cdot a\right) \cdot 3}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + b}\right) \cdot \frac{-1}{a}
\end{array}
Initial program 31.1%
Applied rewrites31.1%
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6431.1
Applied rewrites31.1%
lift--.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-fma.f64N/A
flip--N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
rem-square-sqrtN/A
+-commutativeN/A
lift-+.f64N/A
Applied rewrites33.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f6499.0
Applied rewrites99.0%
Final simplification99.0%
(FPCore (a b c)
:precision binary64
(if (<= b 0.084)
(*
(fma
b
0.3333333333333333
(* (- 0.3333333333333333) (sqrt (fma (* c a) -3.0 (* b b)))))
(/ -1.0 a))
(fma (* -0.375 a) (/ (/ (* c c) (* b b)) b) (* -0.5 (/ c b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= 0.084) {
tmp = fma(b, 0.3333333333333333, (-0.3333333333333333 * sqrt(fma((c * a), -3.0, (b * b))))) * (-1.0 / a);
} else {
tmp = fma((-0.375 * a), (((c * c) / (b * b)) / b), (-0.5 * (c / b)));
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= 0.084) tmp = Float64(fma(b, 0.3333333333333333, Float64(Float64(-0.3333333333333333) * sqrt(fma(Float64(c * a), -3.0, Float64(b * b))))) * Float64(-1.0 / a)); else tmp = fma(Float64(-0.375 * a), Float64(Float64(Float64(c * c) / Float64(b * b)) / b), Float64(-0.5 * Float64(c / b))); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, 0.084], N[(N[(b * 0.3333333333333333 + N[((-0.3333333333333333) * N[Sqrt[N[(N[(c * a), $MachinePrecision] * -3.0 + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.375 * a), $MachinePrecision] * N[(N[(N[(c * c), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision] + N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.084:\\
\;\;\;\;\mathsf{fma}\left(b, 0.3333333333333333, \left(-0.3333333333333333\right) \cdot \sqrt{\mathsf{fma}\left(c \cdot a, -3, b \cdot b\right)}\right) \cdot \frac{-1}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.375 \cdot a, \frac{\frac{c \cdot c}{b \cdot b}}{b}, -0.5 \cdot \frac{c}{b}\right)\\
\end{array}
\end{array}
if b < 0.0840000000000000052Initial program 75.3%
Applied rewrites75.3%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites76.0%
if 0.0840000000000000052 < b Initial program 24.1%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6493.5
Applied rewrites93.5%
Applied rewrites93.5%
Final simplification91.1%
(FPCore (a b c)
:precision binary64
(if (<= b 0.084)
(*
(fma
b
0.3333333333333333
(* (- 0.3333333333333333) (sqrt (fma (* c a) -3.0 (* b b)))))
(/ -1.0 a))
(/ (fma (* (* c c) -0.375) (/ a (* b b)) (* -0.5 c)) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 0.084) {
tmp = fma(b, 0.3333333333333333, (-0.3333333333333333 * sqrt(fma((c * a), -3.0, (b * b))))) * (-1.0 / a);
} else {
tmp = fma(((c * c) * -0.375), (a / (b * b)), (-0.5 * c)) / b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= 0.084) tmp = Float64(fma(b, 0.3333333333333333, Float64(Float64(-0.3333333333333333) * sqrt(fma(Float64(c * a), -3.0, Float64(b * b))))) * Float64(-1.0 / a)); else tmp = Float64(fma(Float64(Float64(c * c) * -0.375), Float64(a / Float64(b * b)), Float64(-0.5 * c)) / b); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, 0.084], N[(N[(b * 0.3333333333333333 + N[((-0.3333333333333333) * N[Sqrt[N[(N[(c * a), $MachinePrecision] * -3.0 + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(c * c), $MachinePrecision] * -0.375), $MachinePrecision] * N[(a / N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * c), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.084:\\
\;\;\;\;\mathsf{fma}\left(b, 0.3333333333333333, \left(-0.3333333333333333\right) \cdot \sqrt{\mathsf{fma}\left(c \cdot a, -3, b \cdot b\right)}\right) \cdot \frac{-1}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(c \cdot c\right) \cdot -0.375, \frac{a}{b \cdot b}, -0.5 \cdot c\right)}{b}\\
\end{array}
\end{array}
if b < 0.0840000000000000052Initial program 75.3%
Applied rewrites75.3%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites76.0%
if 0.0840000000000000052 < b Initial program 24.1%
Taylor expanded in b around inf
lower-/.f64N/A
+-commutativeN/A
associate-*r/N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6493.5
Applied rewrites93.5%
Applied rewrites93.5%
Final simplification91.1%
(FPCore (a b c) :precision binary64 (if (<= b 0.084) (/ (- (sqrt (fma b b (* (* -3.0 a) c))) b) (* 3.0 a)) (/ (fma (* (* c c) -0.375) (/ a (* b b)) (* -0.5 c)) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 0.084) {
tmp = (sqrt(fma(b, b, ((-3.0 * a) * c))) - b) / (3.0 * a);
} else {
tmp = fma(((c * c) * -0.375), (a / (b * b)), (-0.5 * c)) / b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= 0.084) tmp = Float64(Float64(sqrt(fma(b, b, Float64(Float64(-3.0 * a) * c))) - b) / Float64(3.0 * a)); else tmp = Float64(fma(Float64(Float64(c * c) * -0.375), Float64(a / Float64(b * b)), Float64(-0.5 * c)) / b); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, 0.084], N[(N[(N[Sqrt[N[(b * b + N[(N[(-3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(c * c), $MachinePrecision] * -0.375), $MachinePrecision] * N[(a / N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * c), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.084:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(-3 \cdot a\right) \cdot c\right)} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(c \cdot c\right) \cdot -0.375, \frac{a}{b \cdot b}, -0.5 \cdot c\right)}{b}\\
\end{array}
\end{array}
if b < 0.0840000000000000052Initial program 75.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval75.4
Applied rewrites75.4%
if 0.0840000000000000052 < b Initial program 24.1%
Taylor expanded in b around inf
lower-/.f64N/A
+-commutativeN/A
associate-*r/N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6493.5
Applied rewrites93.5%
Applied rewrites93.5%
Final simplification91.0%
(FPCore (a b c) :precision binary64 (if (<= b 0.084) (/ (- (sqrt (fma b b (* (* -3.0 a) c))) b) (* 3.0 a)) (/ (* (fma -0.375 (/ (* c a) (* b b)) -0.5) c) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 0.084) {
tmp = (sqrt(fma(b, b, ((-3.0 * a) * c))) - b) / (3.0 * a);
} else {
tmp = (fma(-0.375, ((c * a) / (b * b)), -0.5) * c) / b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= 0.084) tmp = Float64(Float64(sqrt(fma(b, b, Float64(Float64(-3.0 * a) * c))) - b) / Float64(3.0 * a)); else tmp = Float64(Float64(fma(-0.375, Float64(Float64(c * a) / Float64(b * b)), -0.5) * c) / b); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, 0.084], N[(N[(N[Sqrt[N[(b * b + N[(N[(-3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.375 * N[(N[(c * a), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision] * c), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.084:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(-3 \cdot a\right) \cdot c\right)} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.375, \frac{c \cdot a}{b \cdot b}, -0.5\right) \cdot c}{b}\\
\end{array}
\end{array}
if b < 0.0840000000000000052Initial program 75.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval75.4
Applied rewrites75.4%
if 0.0840000000000000052 < b Initial program 24.1%
Taylor expanded in b around inf
lower-/.f64N/A
+-commutativeN/A
associate-*r/N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6493.5
Applied rewrites93.5%
Taylor expanded in c around 0
Applied rewrites93.4%
Final simplification90.9%
(FPCore (a b c) :precision binary64 (if (<= b 0.084) (* (- (sqrt (fma (* c -3.0) a (* b b))) b) (/ 0.3333333333333333 a)) (/ (* (fma -0.375 (/ (* c a) (* b b)) -0.5) c) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 0.084) {
tmp = (sqrt(fma((c * -3.0), a, (b * b))) - b) * (0.3333333333333333 / a);
} else {
tmp = (fma(-0.375, ((c * a) / (b * b)), -0.5) * c) / b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= 0.084) tmp = Float64(Float64(sqrt(fma(Float64(c * -3.0), a, Float64(b * b))) - b) * Float64(0.3333333333333333 / a)); else tmp = Float64(Float64(fma(-0.375, Float64(Float64(c * a) / Float64(b * b)), -0.5) * c) / b); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, 0.084], N[(N[(N[Sqrt[N[(N[(c * -3.0), $MachinePrecision] * a + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.375 * N[(N[(c * a), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision] * c), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.084:\\
\;\;\;\;\left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.375, \frac{c \cdot a}{b \cdot b}, -0.5\right) \cdot c}{b}\\
\end{array}
\end{array}
if b < 0.0840000000000000052Initial program 75.3%
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
metadata-eval75.3
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6475.3
Applied rewrites75.3%
if 0.0840000000000000052 < b Initial program 24.1%
Taylor expanded in b around inf
lower-/.f64N/A
+-commutativeN/A
associate-*r/N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6493.5
Applied rewrites93.5%
Taylor expanded in c around 0
Applied rewrites93.4%
Final simplification90.9%
(FPCore (a b c) :precision binary64 (/ (* (fma -0.375 (/ (* c a) (* b b)) -0.5) c) b))
double code(double a, double b, double c) {
return (fma(-0.375, ((c * a) / (b * b)), -0.5) * c) / b;
}
function code(a, b, c) return Float64(Float64(fma(-0.375, Float64(Float64(c * a) / Float64(b * b)), -0.5) * c) / b) end
code[a_, b_, c_] := N[(N[(N[(-0.375 * N[(N[(c * a), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision] * c), $MachinePrecision] / b), $MachinePrecision]
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(-0.375, \frac{c \cdot a}{b \cdot b}, -0.5\right) \cdot c}{b}
\end{array}
Initial program 31.1%
Taylor expanded in b around inf
lower-/.f64N/A
+-commutativeN/A
associate-*r/N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6489.3
Applied rewrites89.3%
Taylor expanded in c around 0
Applied rewrites89.2%
Final simplification89.2%
(FPCore (a b c) :precision binary64 (* -0.5 (/ c b)))
double code(double a, double b, double c) {
return -0.5 * (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 = (-0.5d0) * (c / b)
end function
public static double code(double a, double b, double c) {
return -0.5 * (c / b);
}
def code(a, b, c): return -0.5 * (c / b)
function code(a, b, c) return Float64(-0.5 * Float64(c / b)) end
function tmp = code(a, b, c) tmp = -0.5 * (c / b); end
code[a_, b_, c_] := N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.5 \cdot \frac{c}{b}
\end{array}
Initial program 31.1%
Taylor expanded in c around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Final simplification80.9%
(FPCore (a b c) :precision binary64 (* (/ -0.5 b) c))
double code(double a, double b, double c) {
return (-0.5 / b) * c;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((-0.5d0) / b) * c
end function
public static double code(double a, double b, double c) {
return (-0.5 / b) * c;
}
def code(a, b, c): return (-0.5 / b) * c
function code(a, b, c) return Float64(Float64(-0.5 / b) * c) end
function tmp = code(a, b, c) tmp = (-0.5 / b) * c; end
code[a_, b_, c_] := N[(N[(-0.5 / b), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.5}{b} \cdot c
\end{array}
Initial program 31.1%
Taylor expanded in c around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Applied rewrites80.7%
Final simplification80.7%
herbie shell --seed 2024247
(FPCore (a b c)
:name "Cubic critical, medium range"
:precision binary64
:pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))