
(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 13 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 -1e+146)
(/ b (- a))
(if (<= b 7.4e-174)
(/ (- (sqrt (fma a (* c -4.0) (* b b))) b) (* a 2.0))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1e+146) {
tmp = b / -a;
} else if (b <= 7.4e-174) {
tmp = (sqrt(fma(a, (c * -4.0), (b * b))) - b) / (a * 2.0);
} else {
tmp = c / -b;
}
return tmp;
}
function code(a, b, c) tmp = 0.0 if (b <= -1e+146) tmp = Float64(b / Float64(-a)); elseif (b <= 7.4e-174) tmp = Float64(Float64(sqrt(fma(a, Float64(c * -4.0), Float64(b * b))) - b) / Float64(a * 2.0)); else tmp = Float64(c / Float64(-b)); end return tmp end
code[a_, b_, c_] := If[LessEqual[b, -1e+146], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 7.4e-174], 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], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+146}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -9.99999999999999934e145Initial program 39.5%
*-commutative39.5%
Simplified39.8%
Taylor expanded in b around -inf 95.9%
associate-*r/95.9%
mul-1-neg95.9%
Simplified95.9%
if -9.99999999999999934e145 < b < 7.40000000000000019e-174Initial program 85.8%
*-commutative85.8%
Simplified86.6%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification86.1%
(FPCore (a b c)
:precision binary64
(if (<= b -1e+146)
(/ b (- a))
(if (<= b 7.4e-174)
(/ (- (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 <= -1e+146) {
tmp = b / -a;
} else if (b <= 7.4e-174) {
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 <= (-1d+146)) then
tmp = b / -a
else if (b <= 7.4d-174) 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 <= -1e+146) {
tmp = b / -a;
} else if (b <= 7.4e-174) {
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 <= -1e+146: tmp = b / -a elif b <= 7.4e-174: 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 <= -1e+146) tmp = Float64(b / Float64(-a)); elseif (b <= 7.4e-174) 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 <= -1e+146) tmp = b / -a; elseif (b <= 7.4e-174) 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, -1e+146], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 7.4e-174], 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 -1 \cdot 10^{+146}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\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 < -9.99999999999999934e145Initial program 39.5%
*-commutative39.5%
Simplified39.8%
Taylor expanded in b around -inf 95.9%
associate-*r/95.9%
mul-1-neg95.9%
Simplified95.9%
if -9.99999999999999934e145 < b < 7.40000000000000019e-174Initial program 85.8%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification85.7%
(FPCore (a b c)
:precision binary64
(if (<= b -6.5e-70)
(* b (+ (/ c (pow b 2.0)) (/ -1.0 a)))
(if (<= b 7.4e-174)
(- (/ (sqrt (* a (* c -4.0))) (* a 2.0)) (/ b (* a 2.0)))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -6.5e-70) {
tmp = b * ((c / pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = (sqrt((a * (c * -4.0))) / (a * 2.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 <= (-6.5d-70)) then
tmp = b * ((c / (b ** 2.0d0)) + ((-1.0d0) / a))
else if (b <= 7.4d-174) then
tmp = (sqrt((a * (c * (-4.0d0)))) / (a * 2.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 <= -6.5e-70) {
tmp = b * ((c / Math.pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = (Math.sqrt((a * (c * -4.0))) / (a * 2.0)) - (b / (a * 2.0));
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -6.5e-70: tmp = b * ((c / math.pow(b, 2.0)) + (-1.0 / a)) elif b <= 7.4e-174: tmp = (math.sqrt((a * (c * -4.0))) / (a * 2.0)) - (b / (a * 2.0)) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -6.5e-70) tmp = Float64(b * Float64(Float64(c / (b ^ 2.0)) + Float64(-1.0 / a))); elseif (b <= 7.4e-174) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -4.0))) / Float64(a * 2.0)) - Float64(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 <= -6.5e-70) tmp = b * ((c / (b ^ 2.0)) + (-1.0 / a)); elseif (b <= 7.4e-174) tmp = (sqrt((a * (c * -4.0))) / (a * 2.0)) - (b / (a * 2.0)); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -6.5e-70], N[(b * N[(N[(c / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.4e-174], N[(N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision] - N[(b / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{-70}:\\
\;\;\;\;b \cdot \left(\frac{c}{{b}^{2}} + \frac{-1}{a}\right)\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -4\right)}}{a \cdot 2} - \frac{b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -6.5000000000000005e-70Initial program 69.2%
*-commutative69.2%
Simplified69.4%
Taylor expanded in b around -inf 85.2%
mul-1-neg85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
+-commutative85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
if -6.5000000000000005e-70 < b < 7.40000000000000019e-174Initial program 77.7%
*-commutative77.7%
Simplified79.2%
Taylor expanded in a around inf 69.4%
*-commutative69.4%
associate-*r*69.4%
Simplified69.4%
div-sub69.5%
Applied egg-rr69.5%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification79.4%
(FPCore (a b c)
:precision binary64
(if (<= b -9.2e-70)
(* b (+ (/ c (pow b 2.0)) (/ -1.0 a)))
(if (<= b 7.4e-174)
(/ (- (sqrt (* a (* c -4.0))) b) (* a 2.0))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -9.2e-70) {
tmp = b * ((c / pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = (sqrt((a * (c * -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 <= (-9.2d-70)) then
tmp = b * ((c / (b ** 2.0d0)) + ((-1.0d0) / a))
else if (b <= 7.4d-174) then
tmp = (sqrt((a * (c * (-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 <= -9.2e-70) {
tmp = b * ((c / Math.pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = (Math.sqrt((a * (c * -4.0))) - b) / (a * 2.0);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -9.2e-70: tmp = b * ((c / math.pow(b, 2.0)) + (-1.0 / a)) elif b <= 7.4e-174: tmp = (math.sqrt((a * (c * -4.0))) - b) / (a * 2.0) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -9.2e-70) tmp = Float64(b * Float64(Float64(c / (b ^ 2.0)) + Float64(-1.0 / a))); elseif (b <= 7.4e-174) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -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 <= -9.2e-70) tmp = b * ((c / (b ^ 2.0)) + (-1.0 / a)); elseif (b <= 7.4e-174) tmp = (sqrt((a * (c * -4.0))) - b) / (a * 2.0); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -9.2e-70], N[(b * N[(N[(c / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.4e-174], N[(N[(N[Sqrt[N[(a * N[(c * -4.0), $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 -9.2 \cdot 10^{-70}:\\
\;\;\;\;b \cdot \left(\frac{c}{{b}^{2}} + \frac{-1}{a}\right)\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -4\right)} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -9.20000000000000002e-70Initial program 69.2%
*-commutative69.2%
Simplified69.4%
Taylor expanded in b around -inf 85.2%
mul-1-neg85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
+-commutative85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
if -9.20000000000000002e-70 < b < 7.40000000000000019e-174Initial program 77.7%
*-commutative77.7%
Simplified79.2%
Taylor expanded in a around inf 69.4%
*-commutative69.4%
associate-*r*69.4%
Simplified69.4%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification79.4%
(FPCore (a b c)
:precision binary64
(if (<= b -4e-70)
(* b (+ (/ c (pow b 2.0)) (/ -1.0 a)))
(if (<= b 7.4e-174)
(* (- (sqrt (* a (* c -4.0))) b) (/ 0.5 a))
(/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -4e-70) {
tmp = b * ((c / pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = (sqrt((a * (c * -4.0))) - b) * (0.5 / 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 <= (-4d-70)) then
tmp = b * ((c / (b ** 2.0d0)) + ((-1.0d0) / a))
else if (b <= 7.4d-174) then
tmp = (sqrt((a * (c * (-4.0d0)))) - b) * (0.5d0 / 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 <= -4e-70) {
tmp = b * ((c / Math.pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = (Math.sqrt((a * (c * -4.0))) - b) * (0.5 / a);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -4e-70: tmp = b * ((c / math.pow(b, 2.0)) + (-1.0 / a)) elif b <= 7.4e-174: tmp = (math.sqrt((a * (c * -4.0))) - b) * (0.5 / a) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -4e-70) tmp = Float64(b * Float64(Float64(c / (b ^ 2.0)) + Float64(-1.0 / a))); elseif (b <= 7.4e-174) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -4.0))) - b) * Float64(0.5 / a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -4e-70) tmp = b * ((c / (b ^ 2.0)) + (-1.0 / a)); elseif (b <= 7.4e-174) tmp = (sqrt((a * (c * -4.0))) - b) * (0.5 / a); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -4e-70], N[(b * N[(N[(c / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.4e-174], N[(N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{-70}:\\
\;\;\;\;b \cdot \left(\frac{c}{{b}^{2}} + \frac{-1}{a}\right)\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -3.99999999999999998e-70Initial program 69.2%
*-commutative69.2%
Simplified69.4%
Taylor expanded in b around -inf 85.2%
mul-1-neg85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
+-commutative85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
if -3.99999999999999998e-70 < b < 7.40000000000000019e-174Initial program 77.7%
*-commutative77.7%
Simplified79.2%
div-sub79.2%
sub-neg79.2%
div-inv79.0%
pow279.0%
*-commutative79.0%
associate-/r*79.0%
metadata-eval79.0%
div-inv79.0%
*-commutative79.0%
associate-/r*79.0%
metadata-eval79.0%
Applied egg-rr79.0%
sub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
add-cube-cbrt78.3%
pow378.3%
Applied egg-rr78.3%
Taylor expanded in b around 0 69.0%
neg-mul-169.0%
unsub-neg69.0%
rem-cube-cbrt69.3%
Simplified69.3%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification79.4%
(FPCore (a b c) :precision binary64 (if (<= b -3.8e-70) (* b (+ (/ c (pow b 2.0)) (/ -1.0 a))) (if (<= b 7.4e-174) (* (sqrt (* a (* c -4.0))) (/ 0.5 a)) (/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -3.8e-70) {
tmp = b * ((c / pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = sqrt((a * (c * -4.0))) * (0.5 / 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 <= (-3.8d-70)) then
tmp = b * ((c / (b ** 2.0d0)) + ((-1.0d0) / a))
else if (b <= 7.4d-174) then
tmp = sqrt((a * (c * (-4.0d0)))) * (0.5d0 / 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 <= -3.8e-70) {
tmp = b * ((c / Math.pow(b, 2.0)) + (-1.0 / a));
} else if (b <= 7.4e-174) {
tmp = Math.sqrt((a * (c * -4.0))) * (0.5 / a);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -3.8e-70: tmp = b * ((c / math.pow(b, 2.0)) + (-1.0 / a)) elif b <= 7.4e-174: tmp = math.sqrt((a * (c * -4.0))) * (0.5 / a) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -3.8e-70) tmp = Float64(b * Float64(Float64(c / (b ^ 2.0)) + Float64(-1.0 / a))); elseif (b <= 7.4e-174) tmp = Float64(sqrt(Float64(a * Float64(c * -4.0))) * Float64(0.5 / a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -3.8e-70) tmp = b * ((c / (b ^ 2.0)) + (-1.0 / a)); elseif (b <= 7.4e-174) tmp = sqrt((a * (c * -4.0))) * (0.5 / a); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -3.8e-70], N[(b * N[(N[(c / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.4e-174], N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{-70}:\\
\;\;\;\;b \cdot \left(\frac{c}{{b}^{2}} + \frac{-1}{a}\right)\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\sqrt{a \cdot \left(c \cdot -4\right)} \cdot \frac{0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -3.7999999999999998e-70Initial program 69.2%
*-commutative69.2%
Simplified69.4%
Taylor expanded in b around -inf 85.2%
mul-1-neg85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
+-commutative85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
if -3.7999999999999998e-70 < b < 7.40000000000000019e-174Initial program 77.7%
*-commutative77.7%
Simplified79.2%
div-sub79.2%
sub-neg79.2%
div-inv79.0%
pow279.0%
*-commutative79.0%
associate-/r*79.0%
metadata-eval79.0%
div-inv79.0%
*-commutative79.0%
associate-/r*79.0%
metadata-eval79.0%
Applied egg-rr79.0%
sub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
add-cube-cbrt78.3%
pow378.3%
Applied egg-rr78.3%
Taylor expanded in a around inf 67.2%
rem-cube-cbrt67.5%
Simplified67.5%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification78.9%
(FPCore (a b c) :precision binary64 (if (<= b -6.5e-70) (/ b (- a)) (if (<= b 7.4e-174) (* (sqrt (* a (* c -4.0))) (/ 0.5 a)) (/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -6.5e-70) {
tmp = b / -a;
} else if (b <= 7.4e-174) {
tmp = sqrt((a * (c * -4.0))) * (0.5 / 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.5d-70)) then
tmp = b / -a
else if (b <= 7.4d-174) then
tmp = sqrt((a * (c * (-4.0d0)))) * (0.5d0 / 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.5e-70) {
tmp = b / -a;
} else if (b <= 7.4e-174) {
tmp = Math.sqrt((a * (c * -4.0))) * (0.5 / a);
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -6.5e-70: tmp = b / -a elif b <= 7.4e-174: tmp = math.sqrt((a * (c * -4.0))) * (0.5 / a) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -6.5e-70) tmp = Float64(b / Float64(-a)); elseif (b <= 7.4e-174) tmp = Float64(sqrt(Float64(a * Float64(c * -4.0))) * Float64(0.5 / a)); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -6.5e-70) tmp = b / -a; elseif (b <= 7.4e-174) tmp = sqrt((a * (c * -4.0))) * (0.5 / a); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -6.5e-70], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 7.4e-174], N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-174}:\\
\;\;\;\;\sqrt{a \cdot \left(c \cdot -4\right)} \cdot \frac{0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -6.5000000000000005e-70Initial program 69.2%
*-commutative69.2%
Simplified69.4%
Taylor expanded in b around -inf 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
if -6.5000000000000005e-70 < b < 7.40000000000000019e-174Initial program 77.7%
*-commutative77.7%
Simplified79.2%
div-sub79.2%
sub-neg79.2%
div-inv79.0%
pow279.0%
*-commutative79.0%
associate-/r*79.0%
metadata-eval79.0%
div-inv79.0%
*-commutative79.0%
associate-/r*79.0%
metadata-eval79.0%
Applied egg-rr79.0%
sub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
add-cube-cbrt78.3%
pow378.3%
Applied egg-rr78.3%
Taylor expanded in a around inf 67.2%
rem-cube-cbrt67.5%
Simplified67.5%
if 7.40000000000000019e-174 < b Initial program 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in a around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Final simplification78.7%
(FPCore (a b c) :precision binary64 (if (<= b -5.6e-160) (/ b (- a)) (if (<= b 2.3e-198) (* 0.5 (sqrt (/ (* c -4.0) a))) (/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -5.6e-160) {
tmp = b / -a;
} else if (b <= 2.3e-198) {
tmp = 0.5 * sqrt(((c * -4.0) / 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 <= (-5.6d-160)) then
tmp = b / -a
else if (b <= 2.3d-198) then
tmp = 0.5d0 * sqrt(((c * (-4.0d0)) / 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 <= -5.6e-160) {
tmp = b / -a;
} else if (b <= 2.3e-198) {
tmp = 0.5 * Math.sqrt(((c * -4.0) / a));
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5.6e-160: tmp = b / -a elif b <= 2.3e-198: tmp = 0.5 * math.sqrt(((c * -4.0) / a)) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5.6e-160) tmp = Float64(b / Float64(-a)); elseif (b <= 2.3e-198) tmp = Float64(0.5 * sqrt(Float64(Float64(c * -4.0) / a))); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5.6e-160) tmp = b / -a; elseif (b <= 2.3e-198) tmp = 0.5 * sqrt(((c * -4.0) / a)); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5.6e-160], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 2.3e-198], N[(0.5 * N[Sqrt[N[(N[(c * -4.0), $MachinePrecision] / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.6 \cdot 10^{-160}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-198}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{c \cdot -4}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -5.60000000000000032e-160Initial program 72.6%
*-commutative72.6%
Simplified72.7%
Taylor expanded in b around -inf 74.6%
associate-*r/74.6%
mul-1-neg74.6%
Simplified74.6%
if -5.60000000000000032e-160 < b < 2.30000000000000013e-198Initial program 72.7%
*-commutative72.7%
Simplified75.1%
div-sub75.1%
sub-neg75.1%
div-inv74.9%
pow274.9%
*-commutative74.9%
associate-/r*74.9%
metadata-eval74.9%
div-inv74.9%
*-commutative74.9%
associate-/r*74.9%
metadata-eval74.9%
Applied egg-rr74.9%
sub-neg74.9%
distribute-rgt-out--74.9%
Simplified74.9%
add-cube-cbrt74.1%
pow374.1%
Applied egg-rr74.1%
Taylor expanded in a around inf 42.0%
rem-cube-cbrt42.4%
*-commutative42.4%
associate-*r/42.2%
Simplified42.2%
pow142.2%
associate-*r/42.4%
*-commutative42.4%
Applied egg-rr42.4%
unpow142.4%
Simplified42.4%
if 2.30000000000000013e-198 < b Initial program 24.5%
*-commutative24.5%
Simplified24.5%
Taylor expanded in a around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
Simplified78.1%
Final simplification70.8%
(FPCore (a b c) :precision binary64 (if (<= b -1.45e-158) (/ b (- a)) (if (<= b 1.9e-198) (* 0.5 (sqrt (* -4.0 (/ c a)))) (/ c (- b)))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.45e-158) {
tmp = b / -a;
} else if (b <= 1.9e-198) {
tmp = 0.5 * sqrt((-4.0 * (c / 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 <= (-1.45d-158)) then
tmp = b / -a
else if (b <= 1.9d-198) then
tmp = 0.5d0 * sqrt(((-4.0d0) * (c / 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 <= -1.45e-158) {
tmp = b / -a;
} else if (b <= 1.9e-198) {
tmp = 0.5 * Math.sqrt((-4.0 * (c / a)));
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.45e-158: tmp = b / -a elif b <= 1.9e-198: tmp = 0.5 * math.sqrt((-4.0 * (c / a))) else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.45e-158) tmp = Float64(b / Float64(-a)); elseif (b <= 1.9e-198) tmp = Float64(0.5 * sqrt(Float64(-4.0 * Float64(c / a)))); else tmp = Float64(c / Float64(-b)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.45e-158) tmp = b / -a; elseif (b <= 1.9e-198) tmp = 0.5 * sqrt((-4.0 * (c / a))); else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.45e-158], N[(b / (-a)), $MachinePrecision], If[LessEqual[b, 1.9e-198], N[(0.5 * N[Sqrt[N[(-4.0 * N[(c / a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{-158}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-198}:\\
\;\;\;\;0.5 \cdot \sqrt{-4 \cdot \frac{c}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < -1.4499999999999999e-158Initial program 72.6%
*-commutative72.6%
Simplified72.7%
Taylor expanded in b around -inf 74.6%
associate-*r/74.6%
mul-1-neg74.6%
Simplified74.6%
if -1.4499999999999999e-158 < b < 1.9000000000000001e-198Initial program 72.7%
*-commutative72.7%
Simplified75.1%
div-sub75.1%
sub-neg75.1%
div-inv74.9%
pow274.9%
*-commutative74.9%
associate-/r*74.9%
metadata-eval74.9%
div-inv74.9%
*-commutative74.9%
associate-/r*74.9%
metadata-eval74.9%
Applied egg-rr74.9%
sub-neg74.9%
distribute-rgt-out--74.9%
Simplified74.9%
add-cube-cbrt74.1%
pow374.1%
Applied egg-rr74.1%
Taylor expanded in a around inf 42.0%
rem-cube-cbrt42.4%
*-commutative42.4%
associate-*r/42.2%
Simplified42.2%
if 1.9000000000000001e-198 < b Initial program 24.5%
*-commutative24.5%
Simplified24.5%
Taylor expanded in a around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
Simplified78.1%
Final simplification70.8%
(FPCore (a b c) :precision binary64 (if (<= b 3.5e-308) (/ b (- a)) (/ c (- b))))
double code(double a, double b, double c) {
double tmp;
if (b <= 3.5e-308) {
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 <= 3.5d-308) 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 <= 3.5e-308) {
tmp = b / -a;
} else {
tmp = c / -b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 3.5e-308: tmp = b / -a else: tmp = c / -b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 3.5e-308) 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 <= 3.5e-308) tmp = b / -a; else tmp = c / -b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 3.5e-308], N[(b / (-a)), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.5 \cdot 10^{-308}:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\end{array}
\end{array}
if b < 3.5e-308Initial program 73.1%
*-commutative73.1%
Simplified73.9%
Taylor expanded in b around -inf 60.3%
associate-*r/60.3%
mul-1-neg60.3%
Simplified60.3%
if 3.5e-308 < b Initial program 29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in a around 0 70.5%
associate-*r/70.5%
mul-1-neg70.5%
Simplified70.5%
Final simplification64.9%
(FPCore (a b c) :precision binary64 (if (<= b 4400000.0) (/ b (- a)) (/ c b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 4400000.0) {
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 <= 4400000.0d0) 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 <= 4400000.0) {
tmp = b / -a;
} else {
tmp = c / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 4400000.0: tmp = b / -a else: tmp = c / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 4400000.0) 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 <= 4400000.0) tmp = b / -a; else tmp = c / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 4400000.0], N[(b / (-a)), $MachinePrecision], N[(c / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4400000:\\
\;\;\;\;\frac{b}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b}\\
\end{array}
\end{array}
if b < 4.4e6Initial program 66.7%
*-commutative66.7%
Simplified67.2%
Taylor expanded in b around -inf 44.7%
associate-*r/44.7%
mul-1-neg44.7%
Simplified44.7%
if 4.4e6 < b Initial program 11.2%
*-commutative11.2%
Simplified11.2%
div-sub9.0%
sub-neg9.0%
div-inv8.7%
pow28.7%
*-commutative8.7%
associate-/r*8.7%
metadata-eval8.7%
div-inv8.9%
*-commutative8.9%
associate-/r*8.9%
metadata-eval8.9%
Applied egg-rr8.9%
sub-neg8.9%
distribute-rgt-out--11.2%
Simplified11.2%
sub-neg11.2%
add-sqr-sqrt0.0%
sqrt-unprod5.7%
sqr-neg5.7%
sqrt-prod5.7%
add-sqr-sqrt5.7%
+-commutative5.7%
flip-+3.2%
pow23.2%
add-sqr-sqrt3.3%
fma-undefine3.3%
add-sqr-sqrt3.3%
pow23.3%
hypot-define3.3%
Applied egg-rr3.3%
fma-define3.3%
+-commutative3.3%
associate-*r*3.3%
*-commutative3.3%
metadata-eval3.3%
cancel-sign-sub-inv3.3%
associate--r-3.5%
+-inverses3.7%
*-commutative3.7%
Simplified3.7%
Taylor expanded in b around -inf 26.8%
Final simplification40.4%
(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 53.4%
*-commutative53.4%
Simplified53.9%
div-sub53.3%
sub-neg53.3%
div-inv53.2%
pow253.2%
*-commutative53.2%
associate-/r*53.2%
metadata-eval53.2%
div-inv53.2%
*-commutative53.2%
associate-/r*53.2%
metadata-eval53.2%
Applied egg-rr53.2%
sub-neg53.2%
distribute-rgt-out--53.8%
Simplified53.8%
sub-neg53.8%
add-sqr-sqrt40.5%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-prod11.6%
add-sqr-sqrt35.6%
+-commutative35.6%
flip-+27.7%
pow227.7%
add-sqr-sqrt27.7%
fma-undefine27.7%
add-sqr-sqrt27.6%
pow227.6%
hypot-define27.6%
Applied egg-rr27.6%
fma-define27.6%
+-commutative27.6%
associate-*r*27.5%
*-commutative27.5%
metadata-eval27.5%
cancel-sign-sub-inv27.5%
associate--r-27.7%
+-inverses28.0%
*-commutative28.0%
Simplified28.0%
Taylor expanded in b around -inf 8.9%
(FPCore (a b c) :precision binary64 (/ b a))
double code(double a, double b, double c) {
return b / 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 / a
end function
public static double code(double a, double b, double c) {
return b / a;
}
def code(a, b, c): return b / a
function code(a, b, c) return Float64(b / a) end
function tmp = code(a, b, c) tmp = b / a; end
code[a_, b_, c_] := N[(b / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{a}
\end{array}
Initial program 53.4%
*-commutative53.4%
Simplified53.9%
*-un-lft-identity53.9%
*-un-lft-identity53.9%
prod-diff53.9%
*-commutative53.9%
*-un-lft-identity53.9%
fma-define53.9%
*-un-lft-identity53.9%
+-commutative53.9%
add-sqr-sqrt40.5%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-prod11.6%
add-sqr-sqrt35.6%
pow235.6%
add-sqr-sqrt25.1%
sqrt-unprod35.6%
sqr-neg35.6%
sqrt-prod11.6%
add-sqr-sqrt35.3%
*-commutative35.3%
*-un-lft-identity35.3%
Applied egg-rr35.3%
fma-undefine35.3%
*-rgt-identity35.3%
Simplified35.3%
Taylor expanded in b around -inf 2.4%
herbie shell --seed 2024130
(FPCore (a b c)
:name "Quadratic roots, full range"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))