
(FPCore (a b_2 c) :precision binary64 (/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
double code(double a, double b_2, double c) {
return (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
code = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a
end function
public static double code(double a, double b_2, double c) {
return (-b_2 + Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
def code(a, b_2, c): return (-b_2 + math.sqrt(((b_2 * b_2) - (a * c)))) / a
function code(a, b_2, c) return Float64(Float64(Float64(-b_2) + sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a) end
function tmp = code(a, b_2, c) tmp = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a; end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) + N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b_2 c) :precision binary64 (/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
double code(double a, double b_2, double c) {
return (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
code = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a
end function
public static double code(double a, double b_2, double c) {
return (-b_2 + Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
def code(a, b_2, c): return (-b_2 + math.sqrt(((b_2 * b_2) - (a * c)))) / a
function code(a, b_2, c) return Float64(Float64(Float64(-b_2) + sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a) end
function tmp = code(a, b_2, c) tmp = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a; end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) + N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\end{array}
(FPCore (a b_2 c)
:precision binary64
(if (<= b_2 -7.2e+100)
(* -2.0 (/ b_2 a))
(if (<= b_2 4e-70)
(/ (- (sqrt (- (* b_2 b_2) (* a c))) b_2) a)
(* -0.5 (/ c b_2)))))
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -7.2e+100) {
tmp = -2.0 * (b_2 / a);
} else if (b_2 <= 4e-70) {
tmp = (sqrt(((b_2 * b_2) - (a * c))) - b_2) / a;
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
real(8) :: tmp
if (b_2 <= (-7.2d+100)) then
tmp = (-2.0d0) * (b_2 / a)
else if (b_2 <= 4d-70) then
tmp = (sqrt(((b_2 * b_2) - (a * c))) - b_2) / a
else
tmp = (-0.5d0) * (c / b_2)
end if
code = tmp
end function
public static double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -7.2e+100) {
tmp = -2.0 * (b_2 / a);
} else if (b_2 <= 4e-70) {
tmp = (Math.sqrt(((b_2 * b_2) - (a * c))) - b_2) / a;
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
def code(a, b_2, c): tmp = 0 if b_2 <= -7.2e+100: tmp = -2.0 * (b_2 / a) elif b_2 <= 4e-70: tmp = (math.sqrt(((b_2 * b_2) - (a * c))) - b_2) / a else: tmp = -0.5 * (c / b_2) return tmp
function code(a, b_2, c) tmp = 0.0 if (b_2 <= -7.2e+100) tmp = Float64(-2.0 * Float64(b_2 / a)); elseif (b_2 <= 4e-70) tmp = Float64(Float64(sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c))) - b_2) / a); else tmp = Float64(-0.5 * Float64(c / b_2)); end return tmp end
function tmp_2 = code(a, b_2, c) tmp = 0.0; if (b_2 <= -7.2e+100) tmp = -2.0 * (b_2 / a); elseif (b_2 <= 4e-70) tmp = (sqrt(((b_2 * b_2) - (a * c))) - b_2) / a; else tmp = -0.5 * (c / b_2); end tmp_2 = tmp; end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -7.2e+100], N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 4e-70], N[(N[(N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b$95$2), $MachinePrecision] / a), $MachinePrecision], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b_2 \leq -7.2 \cdot 10^{+100}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \leq 4 \cdot 10^{-70}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\end{array}
\end{array}
if b_2 < -7.2e100Initial program 39.2%
+-commutative39.2%
unsub-neg39.2%
Simplified39.2%
Taylor expanded in b_2 around -inf 97.0%
if -7.2e100 < b_2 < 3.99999999999999998e-70Initial program 79.3%
+-commutative79.3%
unsub-neg79.3%
Simplified79.3%
if 3.99999999999999998e-70 < b_2 Initial program 18.1%
+-commutative18.1%
unsub-neg18.1%
Simplified18.1%
Taylor expanded in b_2 around inf 86.2%
Final simplification85.8%
(FPCore (a b_2 c) :precision binary64 (if (<= b_2 -4.5e-38) (+ (* -2.0 (/ b_2 a)) (* (/ c b_2) 0.5)) (if (<= b_2 2.6e-70) (/ (- (sqrt (* a (- c))) b_2) a) (* -0.5 (/ c b_2)))))
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -4.5e-38) {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
} else if (b_2 <= 2.6e-70) {
tmp = (sqrt((a * -c)) - b_2) / a;
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
real(8) :: tmp
if (b_2 <= (-4.5d-38)) then
tmp = ((-2.0d0) * (b_2 / a)) + ((c / b_2) * 0.5d0)
else if (b_2 <= 2.6d-70) then
tmp = (sqrt((a * -c)) - b_2) / a
else
tmp = (-0.5d0) * (c / b_2)
end if
code = tmp
end function
public static double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -4.5e-38) {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
} else if (b_2 <= 2.6e-70) {
tmp = (Math.sqrt((a * -c)) - b_2) / a;
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
def code(a, b_2, c): tmp = 0 if b_2 <= -4.5e-38: tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5) elif b_2 <= 2.6e-70: tmp = (math.sqrt((a * -c)) - b_2) / a else: tmp = -0.5 * (c / b_2) return tmp
function code(a, b_2, c) tmp = 0.0 if (b_2 <= -4.5e-38) tmp = Float64(Float64(-2.0 * Float64(b_2 / a)) + Float64(Float64(c / b_2) * 0.5)); elseif (b_2 <= 2.6e-70) tmp = Float64(Float64(sqrt(Float64(a * Float64(-c))) - b_2) / a); else tmp = Float64(-0.5 * Float64(c / b_2)); end return tmp end
function tmp_2 = code(a, b_2, c) tmp = 0.0; if (b_2 <= -4.5e-38) tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5); elseif (b_2 <= 2.6e-70) tmp = (sqrt((a * -c)) - b_2) / a; else tmp = -0.5 * (c / b_2); end tmp_2 = tmp; end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -4.5e-38], N[(N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b$95$2), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 2.6e-70], N[(N[(N[Sqrt[N[(a * (-c)), $MachinePrecision]], $MachinePrecision] - b$95$2), $MachinePrecision] / a), $MachinePrecision], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b_2 \leq -4.5 \cdot 10^{-38}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\
\mathbf{elif}\;b_2 \leq 2.6 \cdot 10^{-70}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(-c\right)} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\end{array}
\end{array}
if b_2 < -4.50000000000000009e-38Initial program 56.2%
+-commutative56.2%
unsub-neg56.2%
Simplified56.2%
Taylor expanded in b_2 around -inf 92.8%
if -4.50000000000000009e-38 < b_2 < 2.60000000000000002e-70Initial program 74.1%
+-commutative74.1%
unsub-neg74.1%
Simplified74.1%
Taylor expanded in b_2 around 0 68.6%
mul-1-neg68.6%
distribute-rgt-neg-out68.6%
Simplified68.6%
if 2.60000000000000002e-70 < b_2 Initial program 18.1%
+-commutative18.1%
unsub-neg18.1%
Simplified18.1%
Taylor expanded in b_2 around inf 86.2%
Final simplification82.5%
(FPCore (a b_2 c) :precision binary64 (if (<= b_2 -3.7e-38) (+ (* -2.0 (/ b_2 a)) (* (/ c b_2) 0.5)) (if (<= b_2 7.6e-71) (/ (sqrt (* a (- c))) a) (* -0.5 (/ c b_2)))))
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -3.7e-38) {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
} else if (b_2 <= 7.6e-71) {
tmp = sqrt((a * -c)) / a;
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
real(8) :: tmp
if (b_2 <= (-3.7d-38)) then
tmp = ((-2.0d0) * (b_2 / a)) + ((c / b_2) * 0.5d0)
else if (b_2 <= 7.6d-71) then
tmp = sqrt((a * -c)) / a
else
tmp = (-0.5d0) * (c / b_2)
end if
code = tmp
end function
public static double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -3.7e-38) {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
} else if (b_2 <= 7.6e-71) {
tmp = Math.sqrt((a * -c)) / a;
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
def code(a, b_2, c): tmp = 0 if b_2 <= -3.7e-38: tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5) elif b_2 <= 7.6e-71: tmp = math.sqrt((a * -c)) / a else: tmp = -0.5 * (c / b_2) return tmp
function code(a, b_2, c) tmp = 0.0 if (b_2 <= -3.7e-38) tmp = Float64(Float64(-2.0 * Float64(b_2 / a)) + Float64(Float64(c / b_2) * 0.5)); elseif (b_2 <= 7.6e-71) tmp = Float64(sqrt(Float64(a * Float64(-c))) / a); else tmp = Float64(-0.5 * Float64(c / b_2)); end return tmp end
function tmp_2 = code(a, b_2, c) tmp = 0.0; if (b_2 <= -3.7e-38) tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5); elseif (b_2 <= 7.6e-71) tmp = sqrt((a * -c)) / a; else tmp = -0.5 * (c / b_2); end tmp_2 = tmp; end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -3.7e-38], N[(N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b$95$2), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 7.6e-71], N[(N[Sqrt[N[(a * (-c)), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b_2 \leq -3.7 \cdot 10^{-38}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\
\mathbf{elif}\;b_2 \leq 7.6 \cdot 10^{-71}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(-c\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\end{array}
\end{array}
if b_2 < -3.7e-38Initial program 56.2%
+-commutative56.2%
unsub-neg56.2%
Simplified56.2%
Taylor expanded in b_2 around -inf 92.8%
if -3.7e-38 < b_2 < 7.59999999999999984e-71Initial program 74.1%
+-commutative74.1%
unsub-neg74.1%
Simplified74.1%
prod-diff73.7%
*-commutative73.7%
fma-def73.7%
associate-+l+73.7%
distribute-rgt-neg-in73.7%
fma-def73.7%
*-commutative73.7%
fma-udef73.7%
distribute-lft-neg-in73.7%
*-commutative73.7%
distribute-rgt-neg-in73.7%
fma-def73.7%
Applied egg-rr73.7%
Taylor expanded in b_2 around 0 66.2%
associate-*l/66.4%
*-lft-identity66.4%
distribute-rgt1-in66.7%
metadata-eval66.7%
mul-1-neg66.7%
*-commutative66.7%
distribute-rgt-neg-out66.7%
Simplified66.7%
if 7.59999999999999984e-71 < b_2 Initial program 18.1%
+-commutative18.1%
unsub-neg18.1%
Simplified18.1%
Taylor expanded in b_2 around inf 86.2%
Final simplification81.8%
(FPCore (a b_2 c) :precision binary64 (if (<= b_2 -5e-310) (+ (* -2.0 (/ b_2 a)) (* (/ c b_2) 0.5)) (* -0.5 (/ c b_2))))
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -5e-310) {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
real(8) :: tmp
if (b_2 <= (-5d-310)) then
tmp = ((-2.0d0) * (b_2 / a)) + ((c / b_2) * 0.5d0)
else
tmp = (-0.5d0) * (c / b_2)
end if
code = tmp
end function
public static double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -5e-310) {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
def code(a, b_2, c): tmp = 0 if b_2 <= -5e-310: tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5) else: tmp = -0.5 * (c / b_2) return tmp
function code(a, b_2, c) tmp = 0.0 if (b_2 <= -5e-310) tmp = Float64(Float64(-2.0 * Float64(b_2 / a)) + Float64(Float64(c / b_2) * 0.5)); else tmp = Float64(-0.5 * Float64(c / b_2)); end return tmp end
function tmp_2 = code(a, b_2, c) tmp = 0.0; if (b_2 <= -5e-310) tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5); else tmp = -0.5 * (c / b_2); end tmp_2 = tmp; end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -5e-310], N[(N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b$95$2), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b_2 \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\end{array}
\end{array}
if b_2 < -4.999999999999985e-310Initial program 65.0%
+-commutative65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in b_2 around -inf 67.6%
if -4.999999999999985e-310 < b_2 Initial program 33.8%
+-commutative33.8%
unsub-neg33.8%
Simplified33.8%
Taylor expanded in b_2 around inf 64.1%
Final simplification66.0%
(FPCore (a b_2 c) :precision binary64 (if (<= b_2 -5e-310) (* -2.0 (/ b_2 a)) (* -0.5 (/ c b_2))))
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -5e-310) {
tmp = -2.0 * (b_2 / a);
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
real(8) :: tmp
if (b_2 <= (-5d-310)) then
tmp = (-2.0d0) * (b_2 / a)
else
tmp = (-0.5d0) * (c / b_2)
end if
code = tmp
end function
public static double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -5e-310) {
tmp = -2.0 * (b_2 / a);
} else {
tmp = -0.5 * (c / b_2);
}
return tmp;
}
def code(a, b_2, c): tmp = 0 if b_2 <= -5e-310: tmp = -2.0 * (b_2 / a) else: tmp = -0.5 * (c / b_2) return tmp
function code(a, b_2, c) tmp = 0.0 if (b_2 <= -5e-310) tmp = Float64(-2.0 * Float64(b_2 / a)); else tmp = Float64(-0.5 * Float64(c / b_2)); end return tmp end
function tmp_2 = code(a, b_2, c) tmp = 0.0; if (b_2 <= -5e-310) tmp = -2.0 * (b_2 / a); else tmp = -0.5 * (c / b_2); end tmp_2 = tmp; end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -5e-310], N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b_2 \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\end{array}
\end{array}
if b_2 < -4.999999999999985e-310Initial program 65.0%
+-commutative65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in b_2 around -inf 67.4%
if -4.999999999999985e-310 < b_2 Initial program 33.8%
+-commutative33.8%
unsub-neg33.8%
Simplified33.8%
Taylor expanded in b_2 around inf 64.1%
Final simplification65.9%
(FPCore (a b_2 c) :precision binary64 (* -2.0 (/ b_2 a)))
double code(double a, double b_2, double c) {
return -2.0 * (b_2 / a);
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
code = (-2.0d0) * (b_2 / a)
end function
public static double code(double a, double b_2, double c) {
return -2.0 * (b_2 / a);
}
def code(a, b_2, c): return -2.0 * (b_2 / a)
function code(a, b_2, c) return Float64(-2.0 * Float64(b_2 / a)) end
function tmp = code(a, b_2, c) tmp = -2.0 * (b_2 / a); end
code[a_, b$95$2_, c_] := N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-2 \cdot \frac{b_2}{a}
\end{array}
Initial program 50.9%
+-commutative50.9%
unsub-neg50.9%
Simplified50.9%
Taylor expanded in b_2 around -inf 38.1%
Final simplification38.1%
(FPCore (a b_2 c) :precision binary64 (/ (- b_2) a))
double code(double a, double b_2, double c) {
return -b_2 / a;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
code = -b_2 / a
end function
public static double code(double a, double b_2, double c) {
return -b_2 / a;
}
def code(a, b_2, c): return -b_2 / a
function code(a, b_2, c) return Float64(Float64(-b_2) / a) end
function tmp = code(a, b_2, c) tmp = -b_2 / a; end
code[a_, b$95$2_, c_] := N[((-b$95$2) / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{-b_2}{a}
\end{array}
Initial program 50.9%
+-commutative50.9%
unsub-neg50.9%
Simplified50.9%
div-sub50.7%
add-cbrt-cube41.6%
add-sqr-sqrt41.6%
cbrt-prod48.9%
*-un-lft-identity48.9%
times-frac48.9%
fma-neg48.3%
Applied egg-rr39.5%
fma-udef39.9%
unsub-neg39.9%
/-rgt-identity39.9%
distribute-rgt-neg-out39.9%
*-commutative39.9%
fma-neg39.9%
*-commutative39.9%
Simplified39.9%
Taylor expanded in c around inf 15.1%
neg-mul-115.1%
distribute-neg-frac15.1%
Simplified15.1%
Final simplification15.1%
herbie shell --seed 2023178
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))