
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.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) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.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) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -2e+153)
(- (/ c b) (/ b a))
(if (<= b -7.2e-153)
(/ (- (sqrt (fma a (* c -4.0) (* b b))) b) (* a 2.0))
(if (<= b 5.6e-96)
(/ -2.0 (/ (+ b (hypot (sqrt (* a (* c -4.0))) b)) c))
(/ c (- b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e+153) {
tmp = (c / b) - (b / a);
} else if (b <= -7.2e-153) {
tmp = (sqrt(fma(a, (c * -4.0), (b * b))) - b) / (a * 2.0);
} else if (b <= 5.6e-96) {
tmp = -2.0 / ((b + hypot(sqrt((a * (c * -4.0))), b)) / c);
} else {
tmp = c / -b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -2e+153) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= -7.2e-153) tmp = Float64(Float64(sqrt(fma(a, Float64(c * -4.0), Float64(b * b))) - b) / Float64(a * 2.0)); elseif (b <= 5.6e-96) tmp = Float64(-2.0 / Float64(Float64(b + hypot(sqrt(Float64(a * Float64(c * -4.0))), b)) / c)); else tmp = Float64(c / Float64(-b)); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -2e+153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-153], N[(N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-96], N[(-2.0 / N[(N[(b + N[Sqrt[N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -2e153Initial program 39.4%
*-commutative39.4%
Simplified39.4%
Taylor expanded in b around -inf 97.7%
mul-1-neg97.7%
distribute-rgt-neg-in97.7%
+-commutative97.7%
mul-1-neg97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in a around inf 98.2%
if -2e153 < b < -7.1999999999999995e-153Initial program 92.8%
*-commutative92.8%
Simplified92.8%
if -7.1999999999999995e-153 < b < 5.60000000000000031e-96Initial program 75.2%
*-commutative75.2%
Simplified75.2%
Applied egg-rr75.0%
sub-neg75.0%
distribute-rgt-out--75.0%
Simplified75.0%
associate-*l/75.2%
clear-num75.0%
Applied egg-rr75.0%
flip--72.5%
add-sqr-sqrt72.3%
fma-undefine72.3%
unpow272.3%
associate--l+72.3%
*-commutative72.3%
associate-*r*72.3%
+-inverses72.3%
+-commutative72.3%
Applied egg-rr72.3%
div-inv72.3%
+-rgt-identity72.3%
associate-*l*72.3%
fma-undefine72.3%
*-commutative72.3%
associate-*l*72.3%
+-rgt-identity72.3%
add-sqr-sqrt72.3%
unpow272.3%
hypot-define72.0%
+-rgt-identity72.0%
associate-*l*72.0%
Applied egg-rr72.0%
associate-*r/72.0%
*-rgt-identity72.0%
associate-/l*76.3%
*-commutative76.3%
*-commutative76.3%
*-commutative76.3%
associate-*l*76.3%
Simplified76.3%
div-inv76.3%
*-commutative76.3%
*-commutative76.3%
*-un-lft-identity76.3%
times-frac76.3%
metadata-eval76.3%
associate-*r*76.3%
Applied egg-rr76.3%
associate-*r/76.3%
times-frac76.3%
metadata-eval76.3%
*-commutative76.3%
associate-*r/76.3%
*-commutative76.3%
times-frac76.6%
*-inverses76.6%
associate-*r/76.6%
*-commutative76.6%
*-lft-identity76.6%
times-frac76.5%
/-rgt-identity76.5%
*-commutative76.5%
Simplified76.5%
*-un-lft-identity76.5%
clear-num76.5%
div-inv76.5%
clear-num76.5%
un-div-inv76.6%
div-inv76.6%
metadata-eval76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*r/76.6%
*-commutative76.6%
times-frac76.6%
metadata-eval76.6%
Simplified76.6%
clear-num76.6%
un-div-inv76.6%
Applied egg-rr76.6%
if 5.60000000000000031e-96 < b Initial program 12.3%
*-commutative12.3%
Simplified12.3%
Taylor expanded in b around inf 90.4%
associate-*r/90.4%
mul-1-neg90.4%
Simplified90.4%
Final simplification89.6%
(FPCore (a b c)
:precision binary64
(if (<= b -2e+153)
(- (/ c b) (/ b a))
(if (<= b -7.2e-153)
(/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0))
(if (<= b 5.6e-96)
(/ -2.0 (/ (+ b (hypot (sqrt (* a (* c -4.0))) b)) c))
(/ c (- b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e+153) {
tmp = (c / b) - (b / a);
} else if (b <= -7.2e-153) {
tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else if (b <= 5.6e-96) {
tmp = -2.0 / ((b + hypot(sqrt((a * (c * -4.0))), b)) / c);
} else {
tmp = c / -b;
}
return tmp;
}
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2e+153) {
tmp = (c / b) - (b / a);
} else if (b <= -7.2e-153) {
tmp = (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else if (b <= 5.6e-96) {
tmp = -2.0 / ((b + Math.hypot(Math.sqrt((a * (c * -4.0))), b)) / c);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2e+153: tmp = (c / b) - (b / a) elif b <= -7.2e-153: tmp = (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0) elif b <= 5.6e-96: tmp = -2.0 / ((b + math.hypot(math.sqrt((a * (c * -4.0))), b)) / c) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2e+153) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= -7.2e-153) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0)); elseif (b <= 5.6e-96) tmp = Float64(-2.0 / Float64(Float64(b + hypot(sqrt(Float64(a * Float64(c * -4.0))), b)) / c)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2e+153) tmp = (c / b) - (b / a); elseif (b <= -7.2e-153) tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0); elseif (b <= 5.6e-96) tmp = -2.0 / ((b + hypot(sqrt((a * (c * -4.0))), b)) / c); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2e+153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-153], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-96], N[(-2.0 / N[(N[(b + N[Sqrt[N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -2e153Initial program 39.4%
*-commutative39.4%
Simplified39.4%
Taylor expanded in b around -inf 97.7%
mul-1-neg97.7%
distribute-rgt-neg-in97.7%
+-commutative97.7%
mul-1-neg97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in a around inf 98.2%
if -2e153 < b < -7.1999999999999995e-153Initial program 92.8%
if -7.1999999999999995e-153 < b < 5.60000000000000031e-96Initial program 75.2%
*-commutative75.2%
Simplified75.2%
Applied egg-rr75.0%
sub-neg75.0%
distribute-rgt-out--75.0%
Simplified75.0%
associate-*l/75.2%
clear-num75.0%
Applied egg-rr75.0%
flip--72.5%
add-sqr-sqrt72.3%
fma-undefine72.3%
unpow272.3%
associate--l+72.3%
*-commutative72.3%
associate-*r*72.3%
+-inverses72.3%
+-commutative72.3%
Applied egg-rr72.3%
div-inv72.3%
+-rgt-identity72.3%
associate-*l*72.3%
fma-undefine72.3%
*-commutative72.3%
associate-*l*72.3%
+-rgt-identity72.3%
add-sqr-sqrt72.3%
unpow272.3%
hypot-define72.0%
+-rgt-identity72.0%
associate-*l*72.0%
Applied egg-rr72.0%
associate-*r/72.0%
*-rgt-identity72.0%
associate-/l*76.3%
*-commutative76.3%
*-commutative76.3%
*-commutative76.3%
associate-*l*76.3%
Simplified76.3%
div-inv76.3%
*-commutative76.3%
*-commutative76.3%
*-un-lft-identity76.3%
times-frac76.3%
metadata-eval76.3%
associate-*r*76.3%
Applied egg-rr76.3%
associate-*r/76.3%
times-frac76.3%
metadata-eval76.3%
*-commutative76.3%
associate-*r/76.3%
*-commutative76.3%
times-frac76.6%
*-inverses76.6%
associate-*r/76.6%
*-commutative76.6%
*-lft-identity76.6%
times-frac76.5%
/-rgt-identity76.5%
*-commutative76.5%
Simplified76.5%
*-un-lft-identity76.5%
clear-num76.5%
div-inv76.5%
clear-num76.5%
un-div-inv76.6%
div-inv76.6%
metadata-eval76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*r/76.6%
*-commutative76.6%
times-frac76.6%
metadata-eval76.6%
Simplified76.6%
clear-num76.6%
un-div-inv76.6%
Applied egg-rr76.6%
if 5.60000000000000031e-96 < b Initial program 12.3%
*-commutative12.3%
Simplified12.3%
Taylor expanded in b around inf 90.4%
associate-*r/90.4%
mul-1-neg90.4%
Simplified90.4%
Final simplification89.6%
(FPCore (a b c)
:precision binary64
(if (<= b -2e+153)
(- (/ c b) (/ b a))
(if (<= b -7.2e-153)
(/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0))
(if (<= b 5.6e-96)
(* -2.0 (/ c (+ b (hypot (sqrt (* a (* c -4.0))) b))))
(/ c (- b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2e+153) {
tmp = (c / b) - (b / a);
} else if (b <= -7.2e-153) {
tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else if (b <= 5.6e-96) {
tmp = -2.0 * (c / (b + hypot(sqrt((a * (c * -4.0))), b)));
} else {
tmp = c / -b;
}
return tmp;
}
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2e+153) {
tmp = (c / b) - (b / a);
} else if (b <= -7.2e-153) {
tmp = (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else if (b <= 5.6e-96) {
tmp = -2.0 * (c / (b + Math.hypot(Math.sqrt((a * (c * -4.0))), b)));
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2e+153: tmp = (c / b) - (b / a) elif b <= -7.2e-153: tmp = (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0) elif b <= 5.6e-96: tmp = -2.0 * (c / (b + math.hypot(math.sqrt((a * (c * -4.0))), b))) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2e+153) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= -7.2e-153) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0)); elseif (b <= 5.6e-96) tmp = Float64(-2.0 * Float64(c / Float64(b + hypot(sqrt(Float64(a * Float64(c * -4.0))), b)))); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2e+153) tmp = (c / b) - (b / a); elseif (b <= -7.2e-153) tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0); elseif (b <= 5.6e-96) tmp = -2.0 * (c / (b + hypot(sqrt((a * (c * -4.0))), b))); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2e+153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-153], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-96], N[(-2.0 * N[(c / N[(b + N[Sqrt[N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\
\;\;\;\;-2 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -2e153Initial program 39.4%
*-commutative39.4%
Simplified39.4%
Taylor expanded in b around -inf 97.7%
mul-1-neg97.7%
distribute-rgt-neg-in97.7%
+-commutative97.7%
mul-1-neg97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in a around inf 98.2%
if -2e153 < b < -7.1999999999999995e-153Initial program 92.8%
if -7.1999999999999995e-153 < b < 5.60000000000000031e-96Initial program 75.2%
*-commutative75.2%
Simplified75.2%
Applied egg-rr75.0%
sub-neg75.0%
distribute-rgt-out--75.0%
Simplified75.0%
associate-*l/75.2%
clear-num75.0%
Applied egg-rr75.0%
flip--72.5%
add-sqr-sqrt72.3%
fma-undefine72.3%
unpow272.3%
associate--l+72.3%
*-commutative72.3%
associate-*r*72.3%
+-inverses72.3%
+-commutative72.3%
Applied egg-rr72.3%
div-inv72.3%
+-rgt-identity72.3%
associate-*l*72.3%
fma-undefine72.3%
*-commutative72.3%
associate-*l*72.3%
+-rgt-identity72.3%
add-sqr-sqrt72.3%
unpow272.3%
hypot-define72.0%
+-rgt-identity72.0%
associate-*l*72.0%
Applied egg-rr72.0%
associate-*r/72.0%
*-rgt-identity72.0%
associate-/l*76.3%
*-commutative76.3%
*-commutative76.3%
*-commutative76.3%
associate-*l*76.3%
Simplified76.3%
div-inv76.3%
*-commutative76.3%
*-commutative76.3%
*-un-lft-identity76.3%
times-frac76.3%
metadata-eval76.3%
associate-*r*76.3%
Applied egg-rr76.3%
associate-*r/76.3%
times-frac76.3%
metadata-eval76.3%
*-commutative76.3%
associate-*r/76.3%
*-commutative76.3%
times-frac76.6%
*-inverses76.6%
associate-*r/76.6%
*-commutative76.6%
*-lft-identity76.6%
times-frac76.5%
/-rgt-identity76.5%
*-commutative76.5%
Simplified76.5%
*-un-lft-identity76.5%
clear-num76.5%
div-inv76.5%
clear-num76.5%
un-div-inv76.6%
div-inv76.6%
metadata-eval76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*r/76.6%
*-commutative76.6%
times-frac76.6%
metadata-eval76.6%
Simplified76.6%
if 5.60000000000000031e-96 < b Initial program 12.3%
*-commutative12.3%
Simplified12.3%
Taylor expanded in b around inf 90.4%
associate-*r/90.4%
mul-1-neg90.4%
Simplified90.4%
Final simplification89.6%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (/ (- (sqrt (* c (* a -4.0))) b) (* a 2.0))))
(if (<= b -2e-8)
(- (/ c b) (/ b a))
(if (<= b -7e-192)
t_0
(if (<= b -2.85e-196) (/ b (- a)) (if (<= b 9e-92) t_0 (/ c (- b))))))))
double code(double a, double b, double c) {
double t_0 = (sqrt((c * (a * -4.0))) - b) / (a * 2.0);
double tmp;
if (b <= -2e-8) {
tmp = (c / b) - (b / a);
} else if (b <= -7e-192) {
tmp = t_0;
} else if (b <= -2.85e-196) {
tmp = b / -a;
} else if (b <= 9e-92) {
tmp = t_0;
} else {
tmp = 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) :: t_0
real(8) :: tmp
t_0 = (sqrt((c * (a * (-4.0d0)))) - b) / (a * 2.0d0)
if (b <= (-2d-8)) then
tmp = (c / b) - (b / a)
else if (b <= (-7d-192)) then
tmp = t_0
else if (b <= (-2.85d-196)) then
tmp = b / -a
else if (b <= 9d-92) then
tmp = t_0
else
tmp = c / -b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = (Math.sqrt((c * (a * -4.0))) - b) / (a * 2.0);
double tmp;
if (b <= -2e-8) {
tmp = (c / b) - (b / a);
} else if (b <= -7e-192) {
tmp = t_0;
} else if (b <= -2.85e-196) {
tmp = b / -a;
} else if (b <= 9e-92) {
tmp = t_0;
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): t_0 = (math.sqrt((c * (a * -4.0))) - b) / (a * 2.0) tmp = 0 if b <= -2e-8: tmp = (c / b) - (b / a) elif b <= -7e-192: tmp = t_0 elif b <= -2.85e-196: tmp = b / -a elif b <= 9e-92: tmp = t_0 else: tmp = c / -b return tmp
function code(a, b, c) t_0 = Float64(Float64(sqrt(Float64(c * Float64(a * -4.0))) - b) / Float64(a * 2.0)) tmp = 0.0 if (b <= -2e-8) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= -7e-192) tmp = t_0; elseif (b <= -2.85e-196) tmp = Float64(b / Float64(-a)); elseif (b <= 9e-92) tmp = t_0; else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) t_0 = (sqrt((c * (a * -4.0))) - b) / (a * 2.0); tmp = 0.0; if (b <= -2e-8) tmp = (c / b) - (b / a); elseif (b <= -7e-192) tmp = t_0; elseif (b <= -2.85e-196) tmp = b / -a; elseif (b <= 9e-92) tmp = t_0; else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2e-8], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7e-192], t$95$0, If[LessEqual[b, -2.85e-196], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 9e-92], t$95$0, N[(c / (-b)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\
\mathbf{if}\;b \leq -2 \cdot 10^{-8}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq -2.85 \cdot 10^{-196}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-92}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -2e-8Initial program 61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in b around -inf 90.3%
mul-1-neg90.3%
distribute-rgt-neg-in90.3%
+-commutative90.3%
mul-1-neg90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in a around inf 90.6%
if -2e-8 < b < -7.00000000000000029e-192 or -2.8500000000000001e-196 < b < 9.0000000000000001e-92Initial program 84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in b around 0 72.2%
*-commutative72.2%
*-commutative72.2%
associate-*r*72.3%
Simplified72.3%
if -7.00000000000000029e-192 < b < -2.8500000000000001e-196Initial program 10.8%
*-commutative10.8%
Simplified10.8%
Taylor expanded in b around -inf 51.7%
mul-1-neg51.7%
distribute-neg-frac251.7%
Simplified51.7%
if 9.0000000000000001e-92 < b Initial program 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in b around inf 91.4%
associate-*r/91.4%
mul-1-neg91.4%
Simplified91.4%
Final simplification84.3%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (* (/ 0.5 a) (- (sqrt (* a (* c -4.0))) b))))
(if (<= b -1.32e-8)
(- (/ c b) (/ b a))
(if (<= b -7e-192)
t_0
(if (<= b -2.85e-196)
(/ b (- a))
(if (<= b 2.1e-91) t_0 (/ c (- b))))))))
double code(double a, double b, double c) {
double t_0 = (0.5 / a) * (sqrt((a * (c * -4.0))) - b);
double tmp;
if (b <= -1.32e-8) {
tmp = (c / b) - (b / a);
} else if (b <= -7e-192) {
tmp = t_0;
} else if (b <= -2.85e-196) {
tmp = b / -a;
} else if (b <= 2.1e-91) {
tmp = t_0;
} else {
tmp = 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) :: t_0
real(8) :: tmp
t_0 = (0.5d0 / a) * (sqrt((a * (c * (-4.0d0)))) - b)
if (b <= (-1.32d-8)) then
tmp = (c / b) - (b / a)
else if (b <= (-7d-192)) then
tmp = t_0
else if (b <= (-2.85d-196)) then
tmp = b / -a
else if (b <= 2.1d-91) then
tmp = t_0
else
tmp = c / -b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = (0.5 / a) * (Math.sqrt((a * (c * -4.0))) - b);
double tmp;
if (b <= -1.32e-8) {
tmp = (c / b) - (b / a);
} else if (b <= -7e-192) {
tmp = t_0;
} else if (b <= -2.85e-196) {
tmp = b / -a;
} else if (b <= 2.1e-91) {
tmp = t_0;
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): t_0 = (0.5 / a) * (math.sqrt((a * (c * -4.0))) - b) tmp = 0 if b <= -1.32e-8: tmp = (c / b) - (b / a) elif b <= -7e-192: tmp = t_0 elif b <= -2.85e-196: tmp = b / -a elif b <= 2.1e-91: tmp = t_0 else: tmp = c / -b return tmp
function code(a, b, c) t_0 = Float64(Float64(0.5 / a) * Float64(sqrt(Float64(a * Float64(c * -4.0))) - b)) tmp = 0.0 if (b <= -1.32e-8) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= -7e-192) tmp = t_0; elseif (b <= -2.85e-196) tmp = Float64(b / Float64(-a)); elseif (b <= 2.1e-91) tmp = t_0; else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) t_0 = (0.5 / a) * (sqrt((a * (c * -4.0))) - b); tmp = 0.0; if (b <= -1.32e-8) tmp = (c / b) - (b / a); elseif (b <= -7e-192) tmp = t_0; elseif (b <= -2.85e-196) tmp = b / -a; elseif (b <= 2.1e-91) tmp = t_0; else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(0.5 / a), $MachinePrecision] * N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.32e-8], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7e-192], t$95$0, If[LessEqual[b, -2.85e-196], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 2.1e-91], t$95$0, N[(c / (-b)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0.5}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right)\\
\mathbf{if}\;b \leq -1.32 \cdot 10^{-8}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq -2.85 \cdot 10^{-196}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-91}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -1.32000000000000007e-8Initial program 61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in b around -inf 90.3%
mul-1-neg90.3%
distribute-rgt-neg-in90.3%
+-commutative90.3%
mul-1-neg90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in a around inf 90.6%
if -1.32000000000000007e-8 < b < -7.00000000000000029e-192 or -2.8500000000000001e-196 < b < 2.0999999999999999e-91Initial program 84.6%
*-commutative84.6%
Simplified84.6%
Applied egg-rr84.4%
sub-neg84.4%
distribute-rgt-out--84.4%
Simplified84.4%
Taylor expanded in a around inf 72.0%
Simplified72.1%
if -7.00000000000000029e-192 < b < -2.8500000000000001e-196Initial program 10.8%
*-commutative10.8%
Simplified10.8%
Taylor expanded in b around -inf 51.7%
mul-1-neg51.7%
distribute-neg-frac251.7%
Simplified51.7%
if 2.0999999999999999e-91 < b Initial program 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in b around inf 91.4%
associate-*r/91.4%
mul-1-neg91.4%
Simplified91.4%
Final simplification84.3%
(FPCore (a b c)
:precision binary64
(if (<= b -8.8e+173)
(- (/ c b) (/ b a))
(if (<= b 2.4e-91)
(/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -8.8e+173) {
tmp = (c / b) - (b / a);
} else if (b <= 2.4e-91) {
tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else {
tmp = 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 <= (-8.8d+173)) then
tmp = (c / b) - (b / a)
else if (b <= 2.4d-91) then
tmp = (sqrt(((b * b) - (c * (a * 4.0d0)))) - b) / (a * 2.0d0)
else
tmp = c / -b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -8.8e+173) {
tmp = (c / b) - (b / a);
} else if (b <= 2.4e-91) {
tmp = (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -8.8e+173: tmp = (c / b) - (b / a) elif b <= 2.4e-91: tmp = (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -8.8e+173) tmp = Float64(Float64(c / b) - Float64(b / a)); elseif (b <= 2.4e-91) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -8.8e+173) tmp = (c / b) - (b / a); elseif (b <= 2.4e-91) tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -8.8e+173], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-91], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -8.7999999999999999e173Initial program 42.8%
*-commutative42.8%
Simplified42.8%
Taylor expanded in b around -inf 97.6%
mul-1-neg97.6%
distribute-rgt-neg-in97.6%
+-commutative97.6%
mul-1-neg97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in a around inf 98.0%
if -8.7999999999999999e173 < b < 2.40000000000000011e-91Initial program 82.7%
if 2.40000000000000011e-91 < b Initial program 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in b around inf 91.4%
associate-*r/91.4%
mul-1-neg91.4%
Simplified91.4%
Final simplification88.2%
(FPCore (a b c) :precision binary64 (if (<= b -7.2e-153) (- (/ c b) (/ b a)) (/ c (- b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -7.2e-153) {
tmp = (c / b) - (b / a);
} else {
tmp = 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 <= (-7.2d-153)) then
tmp = (c / b) - (b / a)
else
tmp = c / -b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -7.2e-153) {
tmp = (c / b) - (b / a);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -7.2e-153: tmp = (c / b) - (b / a) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -7.2e-153) tmp = Float64(Float64(c / b) - Float64(b / a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -7.2e-153) tmp = (c / b) - (b / a); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -7.2e-153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -7.1999999999999995e-153Initial program 71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in b around -inf 74.6%
mul-1-neg74.6%
distribute-rgt-neg-in74.6%
+-commutative74.6%
mul-1-neg74.6%
unsub-neg74.6%
Simplified74.6%
Taylor expanded in a around inf 75.0%
if -7.1999999999999995e-153 < b Initial program 36.1%
*-commutative36.1%
Simplified36.1%
Taylor expanded in b around inf 58.7%
associate-*r/58.7%
mul-1-neg58.7%
Simplified58.7%
Final simplification66.1%
(FPCore (a b c) :precision binary64 (if (<= b -6.8e-232) (/ b (- a)) (/ c (- b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -6.8e-232) {
tmp = b / -a;
} else {
tmp = 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 <= (-6.8d-232)) then
tmp = b / -a
else
tmp = c / -b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -6.8e-232) {
tmp = b / -a;
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -6.8e-232: tmp = b / -a else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -6.8e-232) tmp = Float64(b / Float64(-a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -6.8e-232) tmp = b / -a; else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -6.8e-232], N[(b / (-a)), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{-232}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -6.8000000000000004e-232Initial program 70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in b around -inf 66.7%
mul-1-neg66.7%
distribute-neg-frac266.7%
Simplified66.7%
if -6.8000000000000004e-232 < b Initial program 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in b around inf 67.1%
associate-*r/67.1%
mul-1-neg67.1%
Simplified67.1%
Final simplification66.9%
(FPCore (a b c) :precision binary64 (if (<= b -4.2e-199) (/ b (- a)) (/ c b)))
double code(double a, double b, double c) {
double tmp;
if (b <= -4.2e-199) {
tmp = b / -a;
} else {
tmp = 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 <= (-4.2d-199)) then
tmp = b / -a
else
tmp = c / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -4.2e-199) {
tmp = b / -a;
} else {
tmp = c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -4.2e-199: tmp = b / -a else: tmp = c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -4.2e-199) tmp = Float64(b / Float64(-a)); else tmp = Float64(c / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -4.2e-199) tmp = b / -a; else tmp = c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -4.2e-199], N[(b / (-a)), $MachinePrecision], N[(c / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{-199}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b}\\
\end{array}
\end{array}
if b < -4.20000000000000004e-199Initial program 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in b around -inf 69.3%
mul-1-neg69.3%
distribute-neg-frac269.3%
Simplified69.3%
if -4.20000000000000004e-199 < b Initial program 34.5%
*-commutative34.5%
Simplified34.5%
Taylor expanded in b around -inf 2.3%
mul-1-neg2.3%
distribute-rgt-neg-in2.3%
+-commutative2.3%
mul-1-neg2.3%
unsub-neg2.3%
Simplified2.3%
Taylor expanded in b around 0 14.2%
(FPCore (a b c) :precision binary64 (/ c b))
double code(double a, double b, double c) {
return 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 = c / b
end function
public static double code(double a, double b, double c) {
return c / b;
}
def code(a, b, c): return c / b
function code(a, b, c) return Float64(c / b) end
function tmp = code(a, b, c) tmp = c / b; end
code[a_, b_, c_] := N[(c / b), $MachinePrecision]
\begin{array}{l}
\\
\frac{c}{b}
\end{array}
Initial program 52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in b around -inf 35.5%
mul-1-neg35.5%
distribute-rgt-neg-in35.5%
+-commutative35.5%
mul-1-neg35.5%
unsub-neg35.5%
Simplified35.5%
Taylor expanded in b around 0 9.2%
(FPCore (a b c) :precision binary64 (* c -0.5))
double code(double a, double b, double c) {
return c * -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 * (-0.5d0)
end function
public static double code(double a, double b, double c) {
return c * -0.5;
}
def code(a, b, c): return c * -0.5
function code(a, b, c) return Float64(c * -0.5) end
function tmp = code(a, b, c) tmp = c * -0.5; end
code[a_, b_, c_] := N[(c * -0.5), $MachinePrecision]
\begin{array}{l}
\\
c \cdot -0.5
\end{array}
Initial program 52.0%
*-commutative52.0%
Simplified52.0%
*-un-lft-identity52.0%
*-un-lft-identity52.0%
prod-diff52.0%
*-commutative52.0%
*-un-lft-identity52.0%
fma-define52.0%
*-un-lft-identity52.0%
+-commutative52.0%
add-sqr-sqrt39.7%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-prod10.6%
add-sqr-sqrt35.0%
pow235.0%
add-sqr-sqrt24.6%
sqrt-unprod35.0%
sqr-neg35.0%
sqrt-prod10.6%
add-sqr-sqrt34.2%
*-commutative34.2%
*-un-lft-identity34.2%
Applied egg-rr34.2%
+-commutative34.2%
associate-+l+34.2%
fma-undefine34.2%
*-rgt-identity34.2%
Simplified34.2%
Taylor expanded in b around inf 1.8%
Simplified3.1%
Taylor expanded in b around 0 4.9%
*-commutative4.9%
Simplified4.9%
herbie shell --seed 2024107
(FPCore (a b c)
:name "Quadratic roots, full range"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))