
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -7.2e+109)
(/ (* b (/ 2.0 a)) -3.0)
(if (<= b 2.15e-83)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -7.2e+109) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 2.15e-83) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / 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+109)) then
tmp = (b * (2.0d0 / a)) / (-3.0d0)
else if (b <= 2.15d-83) then
tmp = (sqrt(((b * b) - ((a * 3.0d0) * c))) - b) / (a * 3.0d0)
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -7.2e+109) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 2.15e-83) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -7.2e+109: tmp = (b * (2.0 / a)) / -3.0 elif b <= 2.15e-83: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -7.2e+109) tmp = Float64(Float64(b * Float64(2.0 / a)) / -3.0); elseif (b <= 2.15e-83) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -7.2e+109) tmp = (b * (2.0 / a)) / -3.0; elseif (b <= 2.15e-83) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -7.2e+109], N[(N[(b * N[(2.0 / a), $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[b, 2.15e-83], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(a * 3.0), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+109}:\\
\;\;\;\;\frac{b \cdot \frac{2}{a}}{-3}\\
\mathbf{elif}\;b \leq 2.15 \cdot 10^{-83}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -7.2e109Initial program 58.2%
Applied egg-rr54.6%
Taylor expanded in b around -inf 96.3%
*-commutative96.3%
Simplified96.3%
associate-/r*96.3%
associate-*r/96.4%
Applied egg-rr96.4%
Taylor expanded in b around 0 96.4%
associate-*r/96.4%
*-commutative96.4%
associate-*r/96.4%
Simplified96.4%
if -7.2e109 < b < 2.15000000000000017e-83Initial program 84.7%
if 2.15000000000000017e-83 < b Initial program 15.0%
Taylor expanded in b around inf 85.1%
associate-*r/85.1%
Simplified85.1%
Final simplification87.3%
(FPCore (a b c)
:precision binary64
(if (<= b -1.25e-73)
(/ (* b (/ 2.0 a)) -3.0)
(if (<= b 1.95e-83)
(* 0.3333333333333333 (/ (+ b (sqrt (* -3.0 (* a c)))) a))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.25e-73) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 1.95e-83) {
tmp = 0.3333333333333333 * ((b + sqrt((-3.0 * (a * c)))) / a);
} else {
tmp = (c * -0.5) / 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.25d-73)) then
tmp = (b * (2.0d0 / a)) / (-3.0d0)
else if (b <= 1.95d-83) then
tmp = 0.3333333333333333d0 * ((b + sqrt(((-3.0d0) * (a * c)))) / a)
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.25e-73) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 1.95e-83) {
tmp = 0.3333333333333333 * ((b + Math.sqrt((-3.0 * (a * c)))) / a);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.25e-73: tmp = (b * (2.0 / a)) / -3.0 elif b <= 1.95e-83: tmp = 0.3333333333333333 * ((b + math.sqrt((-3.0 * (a * c)))) / a) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.25e-73) tmp = Float64(Float64(b * Float64(2.0 / a)) / -3.0); elseif (b <= 1.95e-83) tmp = Float64(0.3333333333333333 * Float64(Float64(b + sqrt(Float64(-3.0 * Float64(a * c)))) / a)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.25e-73) tmp = (b * (2.0 / a)) / -3.0; elseif (b <= 1.95e-83) tmp = 0.3333333333333333 * ((b + sqrt((-3.0 * (a * c)))) / a); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.25e-73], N[(N[(b * N[(2.0 / a), $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[b, 1.95e-83], N[(0.3333333333333333 * N[(N[(b + N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{-73}:\\
\;\;\;\;\frac{b \cdot \frac{2}{a}}{-3}\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{-83}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{b + \sqrt{-3 \cdot \left(a \cdot c\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.25e-73Initial program 75.2%
Applied egg-rr62.3%
Taylor expanded in b around -inf 87.8%
*-commutative87.8%
Simplified87.8%
associate-/r*87.7%
associate-*r/87.9%
Applied egg-rr87.9%
Taylor expanded in b around 0 87.9%
associate-*r/87.9%
*-commutative87.9%
associate-*r/87.9%
Simplified87.9%
if -1.25e-73 < b < 1.95e-83Initial program 77.9%
Taylor expanded in b around 0 74.6%
associate-*r*74.8%
*-commutative74.8%
*-commutative74.8%
Simplified74.8%
*-un-lft-identity74.8%
times-frac74.4%
metadata-eval74.4%
+-commutative74.4%
add-sqr-sqrt44.5%
sqrt-unprod74.0%
sqr-neg74.0%
sqrt-unprod29.9%
add-sqr-sqrt72.8%
Applied egg-rr72.8%
Taylor expanded in c around 0 73.0%
if 1.95e-83 < b Initial program 15.0%
Taylor expanded in b around inf 85.1%
associate-*r/85.1%
Simplified85.1%
Final simplification82.7%
(FPCore (a b c)
:precision binary64
(if (<= b -1.92e-60)
(/ (* b (/ 2.0 a)) -3.0)
(if (<= b 2.8e-83)
(* (/ -0.3333333333333333 a) (- b (sqrt (* a (* -3.0 c)))))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.92e-60) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 2.8e-83) {
tmp = (-0.3333333333333333 / a) * (b - sqrt((a * (-3.0 * c))));
} else {
tmp = (c * -0.5) / 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.92d-60)) then
tmp = (b * (2.0d0 / a)) / (-3.0d0)
else if (b <= 2.8d-83) then
tmp = ((-0.3333333333333333d0) / a) * (b - sqrt((a * ((-3.0d0) * c))))
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.92e-60) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 2.8e-83) {
tmp = (-0.3333333333333333 / a) * (b - Math.sqrt((a * (-3.0 * c))));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.92e-60: tmp = (b * (2.0 / a)) / -3.0 elif b <= 2.8e-83: tmp = (-0.3333333333333333 / a) * (b - math.sqrt((a * (-3.0 * c)))) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.92e-60) tmp = Float64(Float64(b * Float64(2.0 / a)) / -3.0); elseif (b <= 2.8e-83) tmp = Float64(Float64(-0.3333333333333333 / a) * Float64(b - sqrt(Float64(a * Float64(-3.0 * c))))); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.92e-60) tmp = (b * (2.0 / a)) / -3.0; elseif (b <= 2.8e-83) tmp = (-0.3333333333333333 / a) * (b - sqrt((a * (-3.0 * c)))); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.92e-60], N[(N[(b * N[(2.0 / a), $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[b, 2.8e-83], N[(N[(-0.3333333333333333 / a), $MachinePrecision] * N[(b - N[Sqrt[N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.92 \cdot 10^{-60}:\\
\;\;\;\;\frac{b \cdot \frac{2}{a}}{-3}\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b - \sqrt{a \cdot \left(-3 \cdot c\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.9200000000000001e-60Initial program 74.7%
Applied egg-rr61.6%
Taylor expanded in b around -inf 88.5%
*-commutative88.5%
Simplified88.5%
associate-/r*88.4%
associate-*r/88.6%
Applied egg-rr88.6%
Taylor expanded in b around 0 88.6%
associate-*r/88.6%
*-commutative88.6%
associate-*r/88.6%
Simplified88.6%
if -1.9200000000000001e-60 < b < 2.8000000000000001e-83Initial program 78.5%
Taylor expanded in b around 0 74.2%
associate-*r*74.4%
*-commutative74.4%
*-commutative74.4%
Simplified74.4%
frac-2neg74.4%
div-inv74.3%
neg-sub074.3%
add-sqr-sqrt45.1%
sqrt-unprod73.9%
sqr-neg73.9%
sqrt-unprod29.2%
add-sqr-sqrt72.5%
associate--l-72.5%
neg-sub072.5%
add-sqr-sqrt43.3%
sqrt-unprod72.5%
sqr-neg72.5%
sqrt-unprod29.1%
add-sqr-sqrt74.3%
distribute-lft-neg-in74.3%
metadata-eval74.3%
*-commutative74.3%
associate-/r*73.9%
div-inv73.7%
metadata-eval73.7%
Applied egg-rr73.7%
*-commutative73.7%
associate-*l/73.8%
metadata-eval73.8%
associate-*r*74.1%
*-commutative74.1%
associate-*r*74.0%
Simplified74.0%
if 2.8000000000000001e-83 < b Initial program 15.0%
Taylor expanded in b around inf 85.1%
associate-*r/85.1%
Simplified85.1%
Final simplification83.1%
(FPCore (a b c)
:precision binary64
(if (<= b -1.45e-59)
(/ (* b (/ 2.0 a)) -3.0)
(if (<= b 8.4e-84)
(/ (- (sqrt (* a (* -3.0 c))) b) (* a 3.0))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.45e-59) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 8.4e-84) {
tmp = (sqrt((a * (-3.0 * c))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / 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-59)) then
tmp = (b * (2.0d0 / a)) / (-3.0d0)
else if (b <= 8.4d-84) then
tmp = (sqrt((a * ((-3.0d0) * c))) - b) / (a * 3.0d0)
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.45e-59) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 8.4e-84) {
tmp = (Math.sqrt((a * (-3.0 * c))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.45e-59: tmp = (b * (2.0 / a)) / -3.0 elif b <= 8.4e-84: tmp = (math.sqrt((a * (-3.0 * c))) - b) / (a * 3.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.45e-59) tmp = Float64(Float64(b * Float64(2.0 / a)) / -3.0); elseif (b <= 8.4e-84) tmp = Float64(Float64(sqrt(Float64(a * Float64(-3.0 * c))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.45e-59) tmp = (b * (2.0 / a)) / -3.0; elseif (b <= 8.4e-84) tmp = (sqrt((a * (-3.0 * c))) - b) / (a * 3.0); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.45e-59], N[(N[(b * N[(2.0 / a), $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[b, 8.4e-84], N[(N[(N[Sqrt[N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{-59}:\\
\;\;\;\;\frac{b \cdot \frac{2}{a}}{-3}\\
\mathbf{elif}\;b \leq 8.4 \cdot 10^{-84}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(-3 \cdot c\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.45000000000000008e-59Initial program 74.7%
Applied egg-rr61.6%
Taylor expanded in b around -inf 88.5%
*-commutative88.5%
Simplified88.5%
associate-/r*88.4%
associate-*r/88.6%
Applied egg-rr88.6%
Taylor expanded in b around 0 88.6%
associate-*r/88.6%
*-commutative88.6%
associate-*r/88.6%
Simplified88.6%
if -1.45000000000000008e-59 < b < 8.39999999999999992e-84Initial program 78.5%
Taylor expanded in b around 0 74.2%
associate-*r*74.4%
*-commutative74.4%
*-commutative74.4%
Simplified74.4%
+-commutative74.4%
unsub-neg74.4%
Applied egg-rr74.4%
associate-*r*74.2%
*-commutative74.2%
associate-*r*74.2%
Simplified74.2%
if 8.39999999999999992e-84 < b Initial program 15.0%
Taylor expanded in b around inf 85.1%
associate-*r/85.1%
Simplified85.1%
Final simplification83.2%
(FPCore (a b c)
:precision binary64
(if (<= b -1.95e-63)
(/ (* b (/ 2.0 a)) -3.0)
(if (<= b 6.7e-84)
(/ (- (sqrt (* c (* a -3.0))) b) (* a 3.0))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.95e-63) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 6.7e-84) {
tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / 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.95d-63)) then
tmp = (b * (2.0d0 / a)) / (-3.0d0)
else if (b <= 6.7d-84) then
tmp = (sqrt((c * (a * (-3.0d0)))) - b) / (a * 3.0d0)
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.95e-63) {
tmp = (b * (2.0 / a)) / -3.0;
} else if (b <= 6.7e-84) {
tmp = (Math.sqrt((c * (a * -3.0))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.95e-63: tmp = (b * (2.0 / a)) / -3.0 elif b <= 6.7e-84: tmp = (math.sqrt((c * (a * -3.0))) - b) / (a * 3.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.95e-63) tmp = Float64(Float64(b * Float64(2.0 / a)) / -3.0); elseif (b <= 6.7e-84) tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -1.95e-63) tmp = (b * (2.0 / a)) / -3.0; elseif (b <= 6.7e-84) tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.95e-63], N[(N[(b * N[(2.0 / a), $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[b, 6.7e-84], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{-63}:\\
\;\;\;\;\frac{b \cdot \frac{2}{a}}{-3}\\
\mathbf{elif}\;b \leq 6.7 \cdot 10^{-84}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.95000000000000011e-63Initial program 74.7%
Applied egg-rr61.6%
Taylor expanded in b around -inf 88.5%
*-commutative88.5%
Simplified88.5%
associate-/r*88.4%
associate-*r/88.6%
Applied egg-rr88.6%
Taylor expanded in b around 0 88.6%
associate-*r/88.6%
*-commutative88.6%
associate-*r/88.6%
Simplified88.6%
if -1.95000000000000011e-63 < b < 6.7e-84Initial program 78.5%
Taylor expanded in b around 0 74.2%
associate-*r*74.4%
*-commutative74.4%
*-commutative74.4%
Simplified74.4%
+-commutative74.4%
unsub-neg74.4%
Applied egg-rr74.4%
if 6.7e-84 < b Initial program 15.0%
Taylor expanded in b around inf 85.1%
associate-*r/85.1%
Simplified85.1%
Final simplification83.2%
(FPCore (a b c) :precision binary64 (if (<= b 1.05e-275) (* b (/ 2.0 (* a -3.0))) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = b * (2.0 / (a * -3.0));
} else {
tmp = (c * -0.5) / 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.05d-275) then
tmp = b * (2.0d0 / (a * (-3.0d0)))
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = b * (2.0 / (a * -3.0));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.05e-275: tmp = b * (2.0 / (a * -3.0)) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.05e-275) tmp = Float64(b * Float64(2.0 / Float64(a * -3.0))); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.05e-275) tmp = b * (2.0 / (a * -3.0)); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.05e-275], N[(b * N[(2.0 / N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.05 \cdot 10^{-275}:\\
\;\;\;\;b \cdot \frac{2}{a \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < 1.04999999999999994e-275Initial program 76.9%
Taylor expanded in b around -inf 62.5%
*-commutative62.5%
Simplified62.5%
associate-*l/62.5%
clear-num62.5%
Applied egg-rr62.5%
clear-num62.5%
*-commutative62.5%
*-un-lft-identity62.5%
times-frac62.5%
metadata-eval62.5%
metadata-eval62.5%
times-frac62.5%
*-commutative62.5%
*-commutative62.5%
un-div-inv62.6%
associate-*l*62.6%
un-div-inv62.6%
Applied egg-rr62.6%
if 1.04999999999999994e-275 < b Initial program 28.6%
Taylor expanded in b around inf 69.9%
associate-*r/69.9%
Simplified69.9%
Final simplification65.6%
(FPCore (a b c) :precision binary64 (if (<= b 2.35e-271) (/ (* b (/ 2.0 a)) -3.0) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.35e-271) {
tmp = (b * (2.0 / a)) / -3.0;
} else {
tmp = (c * -0.5) / 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 <= 2.35d-271) then
tmp = (b * (2.0d0 / a)) / (-3.0d0)
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 2.35e-271) {
tmp = (b * (2.0 / a)) / -3.0;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.35e-271: tmp = (b * (2.0 / a)) / -3.0 else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.35e-271) tmp = Float64(Float64(b * Float64(2.0 / a)) / -3.0); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 2.35e-271) tmp = (b * (2.0 / a)) / -3.0; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.35e-271], N[(N[(b * N[(2.0 / a), $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.35 \cdot 10^{-271}:\\
\;\;\;\;\frac{b \cdot \frac{2}{a}}{-3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < 2.35000000000000002e-271Initial program 76.9%
Applied egg-rr68.8%
Taylor expanded in b around -inf 62.6%
*-commutative62.6%
Simplified62.6%
associate-/r*62.5%
associate-*r/62.6%
Applied egg-rr62.6%
Taylor expanded in b around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
associate-*r/62.6%
Simplified62.6%
if 2.35000000000000002e-271 < b Initial program 28.6%
Taylor expanded in b around inf 69.9%
associate-*r/69.9%
Simplified69.9%
Final simplification65.6%
(FPCore (a b c) :precision binary64 (if (<= b 3e-221) (* b (/ -1.3333333333333333 a)) 0.0))
double code(double a, double b, double c) {
double tmp;
if (b <= 3e-221) {
tmp = b * (-1.3333333333333333 / a);
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= 3d-221) then
tmp = b * ((-1.3333333333333333d0) / a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 3e-221) {
tmp = b * (-1.3333333333333333 / a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 3e-221: tmp = b * (-1.3333333333333333 / a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 3e-221) tmp = Float64(b * Float64(-1.3333333333333333 / a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 3e-221) tmp = b * (-1.3333333333333333 / a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 3e-221], N[(b * N[(-1.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3 \cdot 10^{-221}:\\
\;\;\;\;b \cdot \frac{-1.3333333333333333}{a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < 3.0000000000000002e-221Initial program 76.3%
+-commutative76.3%
sqr-neg76.3%
unsub-neg76.3%
div-sub76.3%
--rgt-identity76.3%
div-sub76.3%
Simplified76.2%
*-un-lft-identity76.2%
*-un-lft-identity76.2%
prod-diff76.2%
Applied egg-rr30.4%
+-commutative30.4%
associate-+l+30.4%
associate-*r*30.3%
*-commutative30.3%
associate-*l*30.3%
fma-udef30.3%
*-rgt-identity30.3%
Simplified30.3%
Taylor expanded in b around inf 1.8%
*-commutative1.8%
Simplified1.8%
expm1-log1p-u1.6%
expm1-udef2.0%
Applied egg-rr2.0%
expm1-def1.6%
expm1-log1p-u1.8%
frac-2neg1.8%
associate-*l/1.8%
add-sqr-sqrt1.5%
sqrt-unprod1.8%
sqr-neg1.8%
sqrt-unprod0.2%
add-sqr-sqrt25.9%
Applied egg-rr25.9%
*-commutative25.9%
neg-mul-125.9%
times-frac25.9%
metadata-eval25.9%
metadata-eval25.9%
distribute-lft-neg-in25.9%
*-commutative25.9%
associate-*l/25.9%
associate-*r/25.9%
metadata-eval25.9%
associate-*r/25.9%
distribute-rgt-neg-in25.9%
associate-*r/25.9%
metadata-eval25.9%
distribute-neg-frac25.9%
metadata-eval25.9%
Simplified25.9%
if 3.0000000000000002e-221 < b Initial program 27.7%
+-commutative27.7%
sqr-neg27.7%
unsub-neg27.7%
div-sub27.4%
--rgt-identity27.4%
div-sub27.7%
Simplified27.6%
*-un-lft-identity27.6%
*-un-lft-identity27.6%
prod-diff27.6%
Applied egg-rr23.1%
+-commutative23.1%
associate-+l+23.1%
associate-*r*23.0%
*-commutative23.0%
associate-*l*23.0%
fma-udef23.0%
*-rgt-identity23.0%
Simplified23.0%
Taylor expanded in b around inf 3.6%
*-commutative3.6%
Simplified3.6%
expm1-log1p-u2.6%
expm1-udef2.4%
Applied egg-rr2.4%
Taylor expanded in b around 0 20.1%
Final simplification23.6%
(FPCore (a b c) :precision binary64 (if (<= b 1.7e-216) (* -0.6666666666666666 (/ b a)) 0.0))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.7e-216) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= 1.7d-216) then
tmp = (-0.6666666666666666d0) * (b / a)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.7e-216) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.7e-216: tmp = -0.6666666666666666 * (b / a) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.7e-216) tmp = Float64(-0.6666666666666666 * Float64(b / a)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.7e-216) tmp = -0.6666666666666666 * (b / a); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.7e-216], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.7 \cdot 10^{-216}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < 1.6999999999999999e-216Initial program 76.3%
Taylor expanded in b around -inf 60.9%
*-commutative60.9%
Simplified60.9%
if 1.6999999999999999e-216 < b Initial program 27.7%
+-commutative27.7%
sqr-neg27.7%
unsub-neg27.7%
div-sub27.4%
--rgt-identity27.4%
div-sub27.7%
Simplified27.6%
*-un-lft-identity27.6%
*-un-lft-identity27.6%
prod-diff27.6%
Applied egg-rr23.1%
+-commutative23.1%
associate-+l+23.1%
associate-*r*23.0%
*-commutative23.0%
associate-*l*23.0%
fma-udef23.0%
*-rgt-identity23.0%
Simplified23.0%
Taylor expanded in b around inf 3.6%
*-commutative3.6%
Simplified3.6%
expm1-log1p-u2.6%
expm1-udef2.4%
Applied egg-rr2.4%
Taylor expanded in b around 0 20.1%
Final simplification44.7%
(FPCore (a b c) :precision binary64 (if (<= b 3.9e-221) (/ -0.6666666666666666 (/ a b)) 0.0))
double code(double a, double b, double c) {
double tmp;
if (b <= 3.9e-221) {
tmp = -0.6666666666666666 / (a / b);
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= 3.9d-221) then
tmp = (-0.6666666666666666d0) / (a / b)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 3.9e-221) {
tmp = -0.6666666666666666 / (a / b);
} else {
tmp = 0.0;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 3.9e-221: tmp = -0.6666666666666666 / (a / b) else: tmp = 0.0 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 3.9e-221) tmp = Float64(-0.6666666666666666 / Float64(a / b)); else tmp = 0.0; end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 3.9e-221) tmp = -0.6666666666666666 / (a / b); else tmp = 0.0; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 3.9e-221], N[(-0.6666666666666666 / N[(a / b), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.9 \cdot 10^{-221}:\\
\;\;\;\;\frac{-0.6666666666666666}{\frac{a}{b}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if b < 3.8999999999999998e-221Initial program 76.3%
Taylor expanded in b around -inf 60.9%
*-commutative60.9%
Simplified60.9%
*-commutative60.9%
clear-num60.9%
un-div-inv61.0%
Applied egg-rr61.0%
if 3.8999999999999998e-221 < b Initial program 27.7%
+-commutative27.7%
sqr-neg27.7%
unsub-neg27.7%
div-sub27.4%
--rgt-identity27.4%
div-sub27.7%
Simplified27.6%
*-un-lft-identity27.6%
*-un-lft-identity27.6%
prod-diff27.6%
Applied egg-rr23.1%
+-commutative23.1%
associate-+l+23.1%
associate-*r*23.0%
*-commutative23.0%
associate-*l*23.0%
fma-udef23.0%
*-rgt-identity23.0%
Simplified23.0%
Taylor expanded in b around inf 3.6%
*-commutative3.6%
Simplified3.6%
expm1-log1p-u2.6%
expm1-udef2.4%
Applied egg-rr2.4%
Taylor expanded in b around 0 20.1%
Final simplification44.7%
(FPCore (a b c) :precision binary64 (if (<= b 1.05e-275) (/ -0.6666666666666666 (/ a b)) (/ -0.5 (/ b c))))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = -0.6666666666666666 / (a / b);
} else {
tmp = -0.5 / (b / c);
}
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.05d-275) then
tmp = (-0.6666666666666666d0) / (a / b)
else
tmp = (-0.5d0) / (b / c)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = -0.6666666666666666 / (a / b);
} else {
tmp = -0.5 / (b / c);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.05e-275: tmp = -0.6666666666666666 / (a / b) else: tmp = -0.5 / (b / c) return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.05e-275) tmp = Float64(-0.6666666666666666 / Float64(a / b)); else tmp = Float64(-0.5 / Float64(b / c)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.05e-275) tmp = -0.6666666666666666 / (a / b); else tmp = -0.5 / (b / c); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.05e-275], N[(-0.6666666666666666 / N[(a / b), $MachinePrecision]), $MachinePrecision], N[(-0.5 / N[(b / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.05 \cdot 10^{-275}:\\
\;\;\;\;\frac{-0.6666666666666666}{\frac{a}{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{\frac{b}{c}}\\
\end{array}
\end{array}
if b < 1.04999999999999994e-275Initial program 76.9%
Taylor expanded in b around -inf 62.5%
*-commutative62.5%
Simplified62.5%
*-commutative62.5%
clear-num62.4%
un-div-inv62.5%
Applied egg-rr62.5%
if 1.04999999999999994e-275 < b Initial program 28.6%
Taylor expanded in b around inf 69.9%
associate-*r/69.9%
associate-/l*69.6%
Simplified69.6%
Final simplification65.4%
(FPCore (a b c) :precision binary64 (if (<= b 1.05e-275) (/ b (* a -1.5)) (/ -0.5 (/ b c))))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = b / (a * -1.5);
} else {
tmp = -0.5 / (b / c);
}
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.05d-275) then
tmp = b / (a * (-1.5d0))
else
tmp = (-0.5d0) / (b / c)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = b / (a * -1.5);
} else {
tmp = -0.5 / (b / c);
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.05e-275: tmp = b / (a * -1.5) else: tmp = -0.5 / (b / c) return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.05e-275) tmp = Float64(b / Float64(a * -1.5)); else tmp = Float64(-0.5 / Float64(b / c)); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.05e-275) tmp = b / (a * -1.5); else tmp = -0.5 / (b / c); end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.05e-275], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], N[(-0.5 / N[(b / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.05 \cdot 10^{-275}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{\frac{b}{c}}\\
\end{array}
\end{array}
if b < 1.04999999999999994e-275Initial program 76.9%
Applied egg-rr68.8%
Taylor expanded in b around -inf 62.6%
*-commutative62.6%
Simplified62.6%
associate-/r*62.5%
associate-*r/62.6%
Applied egg-rr62.6%
Taylor expanded in b around 0 62.5%
metadata-eval62.5%
times-frac62.5%
*-commutative62.5%
*-lft-identity62.5%
Simplified62.5%
if 1.04999999999999994e-275 < b Initial program 28.6%
Taylor expanded in b around inf 69.9%
associate-*r/69.9%
associate-/l*69.6%
Simplified69.6%
Final simplification65.5%
(FPCore (a b c) :precision binary64 (if (<= b 1.05e-275) (/ b (* a -1.5)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = b / (a * -1.5);
} else {
tmp = (c * -0.5) / 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.05d-275) then
tmp = b / (a * (-1.5d0))
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.05e-275) {
tmp = b / (a * -1.5);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.05e-275: tmp = b / (a * -1.5) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.05e-275) tmp = Float64(b / Float64(a * -1.5)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.05e-275) tmp = b / (a * -1.5); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.05e-275], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.05 \cdot 10^{-275}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < 1.04999999999999994e-275Initial program 76.9%
Applied egg-rr68.8%
Taylor expanded in b around -inf 62.6%
*-commutative62.6%
Simplified62.6%
associate-/r*62.5%
associate-*r/62.6%
Applied egg-rr62.6%
Taylor expanded in b around 0 62.5%
metadata-eval62.5%
times-frac62.5%
*-commutative62.5%
*-lft-identity62.5%
Simplified62.5%
if 1.04999999999999994e-275 < b Initial program 28.6%
Taylor expanded in b around inf 69.9%
associate-*r/69.9%
Simplified69.9%
Final simplification65.6%
(FPCore (a b c) :precision binary64 0.0)
double code(double a, double b, double c) {
return 0.0;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 0.0d0
end function
public static double code(double a, double b, double c) {
return 0.0;
}
def code(a, b, c): return 0.0
function code(a, b, c) return 0.0 end
function tmp = code(a, b, c) tmp = 0.0; end
code[a_, b_, c_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 56.9%
+-commutative56.9%
sqr-neg56.9%
unsub-neg56.9%
div-sub56.8%
--rgt-identity56.8%
div-sub56.9%
Simplified56.8%
*-un-lft-identity56.8%
*-un-lft-identity56.8%
prod-diff56.8%
Applied egg-rr27.5%
+-commutative27.5%
associate-+l+27.5%
associate-*r*27.4%
*-commutative27.4%
associate-*l*27.4%
fma-udef27.4%
*-rgt-identity27.4%
Simplified27.4%
Taylor expanded in b around inf 2.5%
*-commutative2.5%
Simplified2.5%
expm1-log1p-u2.0%
expm1-udef2.1%
Applied egg-rr2.1%
Taylor expanded in b around 0 9.8%
Final simplification9.8%
herbie shell --seed 2024029
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))