
(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 13 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
(let* ((t_0 (* (/ c b) -0.5)))
(if (<= b -5.2e+65)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 1.65e-85)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(if (<= b 9e-24)
t_0
(if (<= b 0.00014)
(* (/ 1.0 a) (/ (- b (sqrt (* -3.0 (* a c)))) -3.0))
(if (<= b 6.2e+15)
(/
(/
(fma
-1.6875
(/ (pow (* a c) 3.0) (pow b 4.0))
(fma
-1.125
(/ (pow (* a c) 2.0) (pow b 2.0))
(* a (* c -1.5))))
b)
(* a 3.0))
t_0)))))))
double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -5.2e+65) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 1.65e-85) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 9e-24) {
tmp = t_0;
} else if (b <= 0.00014) {
tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6.2e+15) {
tmp = (fma(-1.6875, (pow((a * c), 3.0) / pow(b, 4.0)), fma(-1.125, (pow((a * c), 2.0) / pow(b, 2.0)), (a * (c * -1.5)))) / b) / (a * 3.0);
} else {
tmp = t_0;
}
return tmp;
}
function code(a, b, c) t_0 = Float64(Float64(c / b) * -0.5) tmp = 0.0 if (b <= -5.2e+65) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 1.65e-85) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); elseif (b <= 9e-24) tmp = t_0; elseif (b <= 0.00014) tmp = Float64(Float64(1.0 / a) * Float64(Float64(b - sqrt(Float64(-3.0 * Float64(a * c)))) / -3.0)); elseif (b <= 6.2e+15) tmp = Float64(Float64(fma(-1.6875, Float64((Float64(a * c) ^ 3.0) / (b ^ 4.0)), fma(-1.125, Float64((Float64(a * c) ^ 2.0) / (b ^ 2.0)), Float64(a * Float64(c * -1.5)))) / b) / Float64(a * 3.0)); else tmp = t_0; end return tmp end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[b, -5.2e+65], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.65e-85], 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], If[LessEqual[b, 9e-24], t$95$0, If[LessEqual[b, 0.00014], N[(N[(1.0 / a), $MachinePrecision] * N[(N[(b - N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e+15], N[(N[(N[(-1.6875 * N[(N[Power[N[(a * c), $MachinePrecision], 3.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-1.125 * N[(N[Power[N[(a * c), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(a * N[(c * -1.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c}{b} \cdot -0.5\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{+65}:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{-85}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq 0.00014:\\
\;\;\;\;\frac{1}{a} \cdot \frac{b - \sqrt{-3 \cdot \left(a \cdot c\right)}}{-3}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{4}}, \mathsf{fma}\left(-1.125, \frac{{\left(a \cdot c\right)}^{2}}{{b}^{2}}, a \cdot \left(c \cdot -1.5\right)\right)\right)}{b}}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < -5.20000000000000005e65Initial program 56.0%
sqr-neg56.0%
sqr-neg56.0%
associate-*l*56.0%
Simplified56.0%
Taylor expanded in b around -inf 91.1%
*-commutative91.1%
Simplified91.1%
associate-*l/91.2%
Applied egg-rr91.2%
metadata-eval91.2%
associate-/l*91.3%
Applied egg-rr91.3%
if -5.20000000000000005e65 < b < 1.64999999999999986e-85Initial program 72.7%
if 1.64999999999999986e-85 < b < 8.9999999999999995e-24 or 6.2e15 < b Initial program 11.1%
sqr-neg11.1%
sqr-neg11.1%
associate-*l*11.1%
Simplified11.1%
Taylor expanded in b around inf 88.5%
*-commutative88.5%
Simplified88.5%
if 8.9999999999999995e-24 < b < 1.3999999999999999e-4Initial program 98.8%
sqr-neg98.8%
sqr-neg98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in b around 0 98.8%
*-un-lft-identity98.8%
frac-2neg98.8%
distribute-neg-in98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
sub-neg98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
associate-*r*98.8%
*-commutative98.8%
*-commutative98.8%
distribute-lft-neg-in98.8%
metadata-eval98.8%
*-commutative98.8%
Applied egg-rr98.8%
*-lft-identity98.8%
Simplified98.8%
*-un-lft-identity98.8%
times-frac100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if 1.3999999999999999e-4 < b < 6.2e15Initial program 28.7%
sqr-neg28.7%
sqr-neg28.7%
associate-*l*28.7%
Simplified28.7%
Taylor expanded in b around inf 56.7%
fma-define56.7%
cube-prod56.7%
+-commutative56.7%
fma-define56.7%
unpow256.7%
unpow256.7%
swap-sqr85.3%
unpow285.3%
*-commutative85.3%
associate-*r*85.3%
Simplified85.3%
Final simplification83.6%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (* (/ c b) -0.5)))
(if (<= b -160000000.0)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 3.3e-83)
(/ (- b (sqrt (* c (* -3.0 a)))) (* -3.0 a))
(if (<= b 3.3e-30)
t_0
(if (<= b 8.2e-5)
(* (/ 1.0 a) (/ (- b (sqrt (* -3.0 (* a c)))) -3.0))
(if (<= b 6500.0)
(* c (+ (* -0.375 (/ (* a c) (pow b 3.0))) (* 0.5 (/ -1.0 b))))
t_0)))))))
double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 3.3e-83) {
tmp = (b - sqrt((c * (-3.0 * a)))) / (-3.0 * a);
} else if (b <= 3.3e-30) {
tmp = t_0;
} else if (b <= 8.2e-5) {
tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6500.0) {
tmp = c * ((-0.375 * ((a * c) / pow(b, 3.0))) + (0.5 * (-1.0 / b)));
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = (c / b) * (-0.5d0)
if (b <= (-160000000.0d0)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 3.3d-83) then
tmp = (b - sqrt((c * ((-3.0d0) * a)))) / ((-3.0d0) * a)
else if (b <= 3.3d-30) then
tmp = t_0
else if (b <= 8.2d-5) then
tmp = (1.0d0 / a) * ((b - sqrt(((-3.0d0) * (a * c)))) / (-3.0d0))
else if (b <= 6500.0d0) then
tmp = c * (((-0.375d0) * ((a * c) / (b ** 3.0d0))) + (0.5d0 * ((-1.0d0) / b)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 3.3e-83) {
tmp = (b - Math.sqrt((c * (-3.0 * a)))) / (-3.0 * a);
} else if (b <= 3.3e-30) {
tmp = t_0;
} else if (b <= 8.2e-5) {
tmp = (1.0 / a) * ((b - Math.sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6500.0) {
tmp = c * ((-0.375 * ((a * c) / Math.pow(b, 3.0))) + (0.5 * (-1.0 / b)));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, c): t_0 = (c / b) * -0.5 tmp = 0 if b <= -160000000.0: tmp = ((b * 2.0) / -3.0) / a elif b <= 3.3e-83: tmp = (b - math.sqrt((c * (-3.0 * a)))) / (-3.0 * a) elif b <= 3.3e-30: tmp = t_0 elif b <= 8.2e-5: tmp = (1.0 / a) * ((b - math.sqrt((-3.0 * (a * c)))) / -3.0) elif b <= 6500.0: tmp = c * ((-0.375 * ((a * c) / math.pow(b, 3.0))) + (0.5 * (-1.0 / b))) else: tmp = t_0 return tmp
function code(a, b, c) t_0 = Float64(Float64(c / b) * -0.5) tmp = 0.0 if (b <= -160000000.0) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 3.3e-83) tmp = Float64(Float64(b - sqrt(Float64(c * Float64(-3.0 * a)))) / Float64(-3.0 * a)); elseif (b <= 3.3e-30) tmp = t_0; elseif (b <= 8.2e-5) tmp = Float64(Float64(1.0 / a) * Float64(Float64(b - sqrt(Float64(-3.0 * Float64(a * c)))) / -3.0)); elseif (b <= 6500.0) tmp = Float64(c * Float64(Float64(-0.375 * Float64(Float64(a * c) / (b ^ 3.0))) + Float64(0.5 * Float64(-1.0 / b)))); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, c) t_0 = (c / b) * -0.5; tmp = 0.0; if (b <= -160000000.0) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 3.3e-83) tmp = (b - sqrt((c * (-3.0 * a)))) / (-3.0 * a); elseif (b <= 3.3e-30) tmp = t_0; elseif (b <= 8.2e-5) tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0); elseif (b <= 6500.0) tmp = c * ((-0.375 * ((a * c) / (b ^ 3.0))) + (0.5 * (-1.0 / b))); else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[b, -160000000.0], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 3.3e-83], N[(N[(b - N[Sqrt[N[(c * N[(-3.0 * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(-3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e-30], t$95$0, If[LessEqual[b, 8.2e-5], N[(N[(1.0 / a), $MachinePrecision] * N[(N[(b - N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6500.0], N[(c * N[(N[(-0.375 * N[(N[(a * c), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c}{b} \cdot -0.5\\
\mathbf{if}\;b \leq -160000000:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{b - \sqrt{c \cdot \left(-3 \cdot a\right)}}{-3 \cdot a}\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{-30}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{b - \sqrt{-3 \cdot \left(a \cdot c\right)}}{-3}\\
\mathbf{elif}\;b \leq 6500:\\
\;\;\;\;c \cdot \left(-0.375 \cdot \frac{a \cdot c}{{b}^{3}} + 0.5 \cdot \frac{-1}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < -1.6e8Initial program 59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-*l*59.0%
Simplified59.0%
Taylor expanded in b around -inf 89.7%
*-commutative89.7%
Simplified89.7%
associate-*l/89.8%
Applied egg-rr89.8%
metadata-eval89.8%
associate-/l*89.9%
Applied egg-rr89.9%
if -1.6e8 < b < 3.2999999999999999e-83Initial program 71.4%
sqr-neg71.4%
sqr-neg71.4%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in b around 0 64.7%
*-un-lft-identity64.7%
frac-2neg64.7%
distribute-neg-in64.7%
add-sqr-sqrt41.5%
sqrt-unprod64.4%
sqr-neg64.4%
sqrt-unprod23.3%
add-sqr-sqrt63.1%
sub-neg63.1%
add-sqr-sqrt39.8%
sqrt-unprod63.1%
sqr-neg63.1%
sqrt-unprod23.2%
add-sqr-sqrt64.7%
associate-*r*64.8%
*-commutative64.8%
*-commutative64.8%
distribute-lft-neg-in64.8%
metadata-eval64.8%
*-commutative64.8%
Applied egg-rr64.8%
*-lft-identity64.8%
Simplified64.8%
if 3.2999999999999999e-83 < b < 3.3000000000000003e-30 or 6500 < b Initial program 12.1%
sqr-neg12.1%
sqr-neg12.1%
associate-*l*12.1%
Simplified12.1%
Taylor expanded in b around inf 87.7%
*-commutative87.7%
Simplified87.7%
if 3.3000000000000003e-30 < b < 8.20000000000000009e-5Initial program 98.8%
sqr-neg98.8%
sqr-neg98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in b around 0 98.8%
*-un-lft-identity98.8%
frac-2neg98.8%
distribute-neg-in98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
sub-neg98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
associate-*r*98.8%
*-commutative98.8%
*-commutative98.8%
distribute-lft-neg-in98.8%
metadata-eval98.8%
*-commutative98.8%
Applied egg-rr98.8%
*-lft-identity98.8%
Simplified98.8%
*-un-lft-identity98.8%
times-frac100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if 8.20000000000000009e-5 < b < 6500Initial program 23.3%
sqr-neg23.3%
sqr-neg23.3%
associate-*l*23.3%
Simplified23.3%
Taylor expanded in c around 0 96.7%
Final simplification81.0%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (* (/ c b) -0.5)))
(if (<= b -5.2e+65)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 1.28e-86)
(/ (- (sqrt (- (* b b) (* 3.0 (* a c)))) b) (* a 3.0))
(if (<= b 2.6e-24)
t_0
(if (<= b 8.6e-5)
(* (/ 1.0 a) (/ (- b (sqrt (* -3.0 (* a c)))) -3.0))
(if (<= b 6.2e+15)
(* c (+ (* -0.375 (/ (* a c) (pow b 3.0))) (* 0.5 (/ -1.0 b))))
t_0)))))))
double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -5.2e+65) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 1.28e-86) {
tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
} else if (b <= 2.6e-24) {
tmp = t_0;
} else if (b <= 8.6e-5) {
tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6.2e+15) {
tmp = c * ((-0.375 * ((a * c) / pow(b, 3.0))) + (0.5 * (-1.0 / b)));
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = (c / b) * (-0.5d0)
if (b <= (-5.2d+65)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 1.28d-86) then
tmp = (sqrt(((b * b) - (3.0d0 * (a * c)))) - b) / (a * 3.0d0)
else if (b <= 2.6d-24) then
tmp = t_0
else if (b <= 8.6d-5) then
tmp = (1.0d0 / a) * ((b - sqrt(((-3.0d0) * (a * c)))) / (-3.0d0))
else if (b <= 6.2d+15) then
tmp = c * (((-0.375d0) * ((a * c) / (b ** 3.0d0))) + (0.5d0 * ((-1.0d0) / b)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -5.2e+65) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 1.28e-86) {
tmp = (Math.sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
} else if (b <= 2.6e-24) {
tmp = t_0;
} else if (b <= 8.6e-5) {
tmp = (1.0 / a) * ((b - Math.sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6.2e+15) {
tmp = c * ((-0.375 * ((a * c) / Math.pow(b, 3.0))) + (0.5 * (-1.0 / b)));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, c): t_0 = (c / b) * -0.5 tmp = 0 if b <= -5.2e+65: tmp = ((b * 2.0) / -3.0) / a elif b <= 1.28e-86: tmp = (math.sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0) elif b <= 2.6e-24: tmp = t_0 elif b <= 8.6e-5: tmp = (1.0 / a) * ((b - math.sqrt((-3.0 * (a * c)))) / -3.0) elif b <= 6.2e+15: tmp = c * ((-0.375 * ((a * c) / math.pow(b, 3.0))) + (0.5 * (-1.0 / b))) else: tmp = t_0 return tmp
function code(a, b, c) t_0 = Float64(Float64(c / b) * -0.5) tmp = 0.0 if (b <= -5.2e+65) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 1.28e-86) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(a * c)))) - b) / Float64(a * 3.0)); elseif (b <= 2.6e-24) tmp = t_0; elseif (b <= 8.6e-5) tmp = Float64(Float64(1.0 / a) * Float64(Float64(b - sqrt(Float64(-3.0 * Float64(a * c)))) / -3.0)); elseif (b <= 6.2e+15) tmp = Float64(c * Float64(Float64(-0.375 * Float64(Float64(a * c) / (b ^ 3.0))) + Float64(0.5 * Float64(-1.0 / b)))); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, c) t_0 = (c / b) * -0.5; tmp = 0.0; if (b <= -5.2e+65) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 1.28e-86) tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0); elseif (b <= 2.6e-24) tmp = t_0; elseif (b <= 8.6e-5) tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0); elseif (b <= 6.2e+15) tmp = c * ((-0.375 * ((a * c) / (b ^ 3.0))) + (0.5 * (-1.0 / b))); else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[b, -5.2e+65], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.28e-86], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-24], t$95$0, If[LessEqual[b, 8.6e-5], N[(N[(1.0 / a), $MachinePrecision] * N[(N[(b - N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e+15], N[(c * N[(N[(-0.375 * N[(N[(a * c), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c}{b} \cdot -0.5\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{+65}:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 1.28 \cdot 10^{-86}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{b - \sqrt{-3 \cdot \left(a \cdot c\right)}}{-3}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;c \cdot \left(-0.375 \cdot \frac{a \cdot c}{{b}^{3}} + 0.5 \cdot \frac{-1}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < -5.20000000000000005e65Initial program 56.0%
sqr-neg56.0%
sqr-neg56.0%
associate-*l*56.0%
Simplified56.0%
Taylor expanded in b around -inf 91.1%
*-commutative91.1%
Simplified91.1%
associate-*l/91.2%
Applied egg-rr91.2%
metadata-eval91.2%
associate-/l*91.3%
Applied egg-rr91.3%
if -5.20000000000000005e65 < b < 1.27999999999999992e-86Initial program 72.7%
sqr-neg72.7%
sqr-neg72.7%
associate-*l*72.5%
Simplified72.5%
if 1.27999999999999992e-86 < b < 2.6e-24 or 6.2e15 < b Initial program 11.1%
sqr-neg11.1%
sqr-neg11.1%
associate-*l*11.1%
Simplified11.1%
Taylor expanded in b around inf 88.5%
*-commutative88.5%
Simplified88.5%
if 2.6e-24 < b < 8.6000000000000003e-5Initial program 98.8%
sqr-neg98.8%
sqr-neg98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in b around 0 98.8%
*-un-lft-identity98.8%
frac-2neg98.8%
distribute-neg-in98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
sub-neg98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
associate-*r*98.8%
*-commutative98.8%
*-commutative98.8%
distribute-lft-neg-in98.8%
metadata-eval98.8%
*-commutative98.8%
Applied egg-rr98.8%
*-lft-identity98.8%
Simplified98.8%
*-un-lft-identity98.8%
times-frac100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if 8.6000000000000003e-5 < b < 6.2e15Initial program 28.7%
sqr-neg28.7%
sqr-neg28.7%
associate-*l*28.7%
Simplified28.7%
Taylor expanded in c around 0 83.8%
Final simplification83.4%
(FPCore (a b c)
:precision binary64
(let* ((t_0 (* (/ c b) -0.5)))
(if (<= b -5.2e+65)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 2.5e-85)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(if (<= b 9e-24)
t_0
(if (<= b 8.2e-5)
(* (/ 1.0 a) (/ (- b (sqrt (* -3.0 (* a c)))) -3.0))
(if (<= b 6.2e+15)
(* c (+ (* -0.375 (/ (* a c) (pow b 3.0))) (* 0.5 (/ -1.0 b))))
t_0)))))))
double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -5.2e+65) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 2.5e-85) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 9e-24) {
tmp = t_0;
} else if (b <= 8.2e-5) {
tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6.2e+15) {
tmp = c * ((-0.375 * ((a * c) / pow(b, 3.0))) + (0.5 * (-1.0 / b)));
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = (c / b) * (-0.5d0)
if (b <= (-5.2d+65)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 2.5d-85) then
tmp = (sqrt(((b * b) - ((a * 3.0d0) * c))) - b) / (a * 3.0d0)
else if (b <= 9d-24) then
tmp = t_0
else if (b <= 8.2d-5) then
tmp = (1.0d0 / a) * ((b - sqrt(((-3.0d0) * (a * c)))) / (-3.0d0))
else if (b <= 6.2d+15) then
tmp = c * (((-0.375d0) * ((a * c) / (b ** 3.0d0))) + (0.5d0 * ((-1.0d0) / b)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double t_0 = (c / b) * -0.5;
double tmp;
if (b <= -5.2e+65) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 2.5e-85) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 9e-24) {
tmp = t_0;
} else if (b <= 8.2e-5) {
tmp = (1.0 / a) * ((b - Math.sqrt((-3.0 * (a * c)))) / -3.0);
} else if (b <= 6.2e+15) {
tmp = c * ((-0.375 * ((a * c) / Math.pow(b, 3.0))) + (0.5 * (-1.0 / b)));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, c): t_0 = (c / b) * -0.5 tmp = 0 if b <= -5.2e+65: tmp = ((b * 2.0) / -3.0) / a elif b <= 2.5e-85: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) elif b <= 9e-24: tmp = t_0 elif b <= 8.2e-5: tmp = (1.0 / a) * ((b - math.sqrt((-3.0 * (a * c)))) / -3.0) elif b <= 6.2e+15: tmp = c * ((-0.375 * ((a * c) / math.pow(b, 3.0))) + (0.5 * (-1.0 / b))) else: tmp = t_0 return tmp
function code(a, b, c) t_0 = Float64(Float64(c / b) * -0.5) tmp = 0.0 if (b <= -5.2e+65) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 2.5e-85) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); elseif (b <= 9e-24) tmp = t_0; elseif (b <= 8.2e-5) tmp = Float64(Float64(1.0 / a) * Float64(Float64(b - sqrt(Float64(-3.0 * Float64(a * c)))) / -3.0)); elseif (b <= 6.2e+15) tmp = Float64(c * Float64(Float64(-0.375 * Float64(Float64(a * c) / (b ^ 3.0))) + Float64(0.5 * Float64(-1.0 / b)))); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, c) t_0 = (c / b) * -0.5; tmp = 0.0; if (b <= -5.2e+65) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 2.5e-85) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); elseif (b <= 9e-24) tmp = t_0; elseif (b <= 8.2e-5) tmp = (1.0 / a) * ((b - sqrt((-3.0 * (a * c)))) / -3.0); elseif (b <= 6.2e+15) tmp = c * ((-0.375 * ((a * c) / (b ^ 3.0))) + (0.5 * (-1.0 / b))); else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[b, -5.2e+65], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 2.5e-85], 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], If[LessEqual[b, 9e-24], t$95$0, If[LessEqual[b, 8.2e-5], N[(N[(1.0 / a), $MachinePrecision] * N[(N[(b - N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e+15], N[(c * N[(N[(-0.375 * N[(N[(a * c), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c}{b} \cdot -0.5\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{+65}:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{-85}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{b - \sqrt{-3 \cdot \left(a \cdot c\right)}}{-3}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;c \cdot \left(-0.375 \cdot \frac{a \cdot c}{{b}^{3}} + 0.5 \cdot \frac{-1}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < -5.20000000000000005e65Initial program 56.0%
sqr-neg56.0%
sqr-neg56.0%
associate-*l*56.0%
Simplified56.0%
Taylor expanded in b around -inf 91.1%
*-commutative91.1%
Simplified91.1%
associate-*l/91.2%
Applied egg-rr91.2%
metadata-eval91.2%
associate-/l*91.3%
Applied egg-rr91.3%
if -5.20000000000000005e65 < b < 2.5000000000000001e-85Initial program 72.7%
if 2.5000000000000001e-85 < b < 8.9999999999999995e-24 or 6.2e15 < b Initial program 11.1%
sqr-neg11.1%
sqr-neg11.1%
associate-*l*11.1%
Simplified11.1%
Taylor expanded in b around inf 88.5%
*-commutative88.5%
Simplified88.5%
if 8.9999999999999995e-24 < b < 8.20000000000000009e-5Initial program 98.8%
sqr-neg98.8%
sqr-neg98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in b around 0 98.8%
*-un-lft-identity98.8%
frac-2neg98.8%
distribute-neg-in98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
sub-neg98.8%
add-sqr-sqrt0.0%
sqrt-unprod98.8%
sqr-neg98.8%
sqrt-unprod98.8%
add-sqr-sqrt98.8%
associate-*r*98.8%
*-commutative98.8%
*-commutative98.8%
distribute-lft-neg-in98.8%
metadata-eval98.8%
*-commutative98.8%
Applied egg-rr98.8%
*-lft-identity98.8%
Simplified98.8%
*-un-lft-identity98.8%
times-frac100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if 8.20000000000000009e-5 < b < 6.2e15Initial program 28.7%
sqr-neg28.7%
sqr-neg28.7%
associate-*l*28.7%
Simplified28.7%
Taylor expanded in c around 0 83.8%
Final simplification83.5%
(FPCore (a b c)
:precision binary64
(if (<= b -160000000.0)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 2e-86)
(* (/ 0.3333333333333333 a) (+ b (sqrt (* -3.0 (* a c)))))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 2e-86) {
tmp = (0.3333333333333333 / a) * (b + sqrt((-3.0 * (a * c))));
} else {
tmp = (c / b) * -0.5;
}
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 <= (-160000000.0d0)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 2d-86) then
tmp = (0.3333333333333333d0 / a) * (b + sqrt(((-3.0d0) * (a * c))))
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 2e-86) {
tmp = (0.3333333333333333 / a) * (b + Math.sqrt((-3.0 * (a * c))));
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -160000000.0: tmp = ((b * 2.0) / -3.0) / a elif b <= 2e-86: tmp = (0.3333333333333333 / a) * (b + math.sqrt((-3.0 * (a * c)))) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -160000000.0) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 2e-86) tmp = Float64(Float64(0.3333333333333333 / a) * Float64(b + sqrt(Float64(-3.0 * Float64(a * c))))); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -160000000.0) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 2e-86) tmp = (0.3333333333333333 / a) * (b + sqrt((-3.0 * (a * c)))); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -160000000.0], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 2e-86], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(b + N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -160000000:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-86}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(b + \sqrt{-3 \cdot \left(a \cdot c\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -1.6e8Initial program 59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-*l*59.0%
Simplified59.0%
Taylor expanded in b around -inf 89.7%
*-commutative89.7%
Simplified89.7%
associate-*l/89.8%
Applied egg-rr89.8%
metadata-eval89.8%
associate-/l*89.9%
Applied egg-rr89.9%
if -1.6e8 < b < 2.00000000000000017e-86Initial program 71.4%
sqr-neg71.4%
sqr-neg71.4%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in b around 0 64.7%
*-un-lft-identity64.7%
*-commutative64.7%
times-frac64.8%
div-inv64.6%
add-sqr-sqrt41.4%
sqrt-unprod64.3%
sqr-neg64.3%
sqrt-unprod23.3%
add-sqr-sqrt63.1%
associate-*r*63.1%
*-commutative63.1%
*-commutative63.1%
metadata-eval63.1%
Applied egg-rr63.1%
*-commutative63.1%
associate-*l*63.2%
associate-*r/63.2%
metadata-eval63.2%
Simplified63.2%
Taylor expanded in c around 0 63.1%
if 2.00000000000000017e-86 < b Initial program 16.7%
sqr-neg16.7%
sqr-neg16.7%
associate-*l*16.7%
Simplified16.7%
Taylor expanded in b around inf 83.9%
*-commutative83.9%
Simplified83.9%
Final simplification78.8%
(FPCore (a b c)
:precision binary64
(if (<= b -160000000.0)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 8.5e-86)
(* (+ b (sqrt (* c (* -3.0 a)))) (/ 0.3333333333333333 a))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 8.5e-86) {
tmp = (b + sqrt((c * (-3.0 * a)))) * (0.3333333333333333 / a);
} else {
tmp = (c / b) * -0.5;
}
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 <= (-160000000.0d0)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 8.5d-86) then
tmp = (b + sqrt((c * ((-3.0d0) * a)))) * (0.3333333333333333d0 / a)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 8.5e-86) {
tmp = (b + Math.sqrt((c * (-3.0 * a)))) * (0.3333333333333333 / a);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -160000000.0: tmp = ((b * 2.0) / -3.0) / a elif b <= 8.5e-86: tmp = (b + math.sqrt((c * (-3.0 * a)))) * (0.3333333333333333 / a) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -160000000.0) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 8.5e-86) tmp = Float64(Float64(b + sqrt(Float64(c * Float64(-3.0 * a)))) * Float64(0.3333333333333333 / a)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -160000000.0) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 8.5e-86) tmp = (b + sqrt((c * (-3.0 * a)))) * (0.3333333333333333 / a); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -160000000.0], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 8.5e-86], N[(N[(b + N[Sqrt[N[(c * N[(-3.0 * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -160000000:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-86}:\\
\;\;\;\;\left(b + \sqrt{c \cdot \left(-3 \cdot a\right)}\right) \cdot \frac{0.3333333333333333}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -1.6e8Initial program 59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-*l*59.0%
Simplified59.0%
Taylor expanded in b around -inf 89.7%
*-commutative89.7%
Simplified89.7%
associate-*l/89.8%
Applied egg-rr89.8%
metadata-eval89.8%
associate-/l*89.9%
Applied egg-rr89.9%
if -1.6e8 < b < 8.499999999999999e-86Initial program 71.4%
sqr-neg71.4%
sqr-neg71.4%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in b around 0 64.7%
*-un-lft-identity64.7%
*-commutative64.7%
times-frac64.8%
div-inv64.6%
add-sqr-sqrt41.4%
sqrt-unprod64.3%
sqr-neg64.3%
sqrt-unprod23.3%
add-sqr-sqrt63.1%
associate-*r*63.1%
*-commutative63.1%
*-commutative63.1%
metadata-eval63.1%
Applied egg-rr63.1%
*-commutative63.1%
associate-*l*63.2%
associate-*r/63.2%
metadata-eval63.2%
Simplified63.2%
if 8.499999999999999e-86 < b Initial program 16.7%
sqr-neg16.7%
sqr-neg16.7%
associate-*l*16.7%
Simplified16.7%
Taylor expanded in b around inf 83.9%
*-commutative83.9%
Simplified83.9%
Final simplification78.8%
(FPCore (a b c)
:precision binary64
(if (<= b -220000000.0)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 1.02e-84)
(* (/ (- b (sqrt (* a (* -3.0 c)))) a) -0.3333333333333333)
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -220000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 1.02e-84) {
tmp = ((b - sqrt((a * (-3.0 * c)))) / a) * -0.3333333333333333;
} else {
tmp = (c / b) * -0.5;
}
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 <= (-220000000.0d0)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 1.02d-84) then
tmp = ((b - sqrt((a * ((-3.0d0) * c)))) / a) * (-0.3333333333333333d0)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -220000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 1.02e-84) {
tmp = ((b - Math.sqrt((a * (-3.0 * c)))) / a) * -0.3333333333333333;
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -220000000.0: tmp = ((b * 2.0) / -3.0) / a elif b <= 1.02e-84: tmp = ((b - math.sqrt((a * (-3.0 * c)))) / a) * -0.3333333333333333 else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -220000000.0) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 1.02e-84) tmp = Float64(Float64(Float64(b - sqrt(Float64(a * Float64(-3.0 * c)))) / a) * -0.3333333333333333); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -220000000.0) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 1.02e-84) tmp = ((b - sqrt((a * (-3.0 * c)))) / a) * -0.3333333333333333; else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -220000000.0], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.02e-84], N[(N[(N[(b - N[Sqrt[N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -220000000:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{-84}:\\
\;\;\;\;\frac{b - \sqrt{a \cdot \left(-3 \cdot c\right)}}{a} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -2.2e8Initial program 59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-*l*59.0%
Simplified59.0%
Taylor expanded in b around -inf 89.7%
*-commutative89.7%
Simplified89.7%
associate-*l/89.8%
Applied egg-rr89.8%
metadata-eval89.8%
associate-/l*89.9%
Applied egg-rr89.9%
if -2.2e8 < b < 1.02000000000000004e-84Initial program 71.4%
sqr-neg71.4%
sqr-neg71.4%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in b around 0 64.7%
frac-2neg64.7%
div-inv64.8%
distribute-neg-in64.8%
add-sqr-sqrt41.5%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod23.4%
add-sqr-sqrt63.2%
sub-neg63.2%
add-sqr-sqrt39.8%
sqrt-unprod63.2%
sqr-neg63.2%
sqrt-unprod23.3%
add-sqr-sqrt64.8%
associate-*r*64.9%
*-commutative64.9%
*-commutative64.9%
distribute-lft-neg-in64.9%
metadata-eval64.9%
*-commutative64.9%
Applied egg-rr64.9%
associate-*r/64.8%
times-frac64.8%
associate-*r*64.7%
*-commutative64.7%
rem-square-sqrt0.0%
unpow20.0%
associate-*r*0.0%
unpow20.0%
rem-square-sqrt64.8%
metadata-eval64.8%
Simplified64.8%
if 1.02000000000000004e-84 < b Initial program 16.7%
sqr-neg16.7%
sqr-neg16.7%
associate-*l*16.7%
Simplified16.7%
Taylor expanded in b around inf 83.9%
*-commutative83.9%
Simplified83.9%
Final simplification79.4%
(FPCore (a b c)
:precision binary64
(if (<= b -160000000.0)
(/ (/ (* b 2.0) -3.0) a)
(if (<= b 2.8e-87)
(/ (- b (sqrt (* c (* -3.0 a)))) (* -3.0 a))
(* (/ c b) -0.5))))
double code(double a, double b, double c) {
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 2.8e-87) {
tmp = (b - sqrt((c * (-3.0 * a)))) / (-3.0 * a);
} else {
tmp = (c / b) * -0.5;
}
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 <= (-160000000.0d0)) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else if (b <= 2.8d-87) then
tmp = (b - sqrt((c * ((-3.0d0) * a)))) / ((-3.0d0) * a)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -160000000.0) {
tmp = ((b * 2.0) / -3.0) / a;
} else if (b <= 2.8e-87) {
tmp = (b - Math.sqrt((c * (-3.0 * a)))) / (-3.0 * a);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -160000000.0: tmp = ((b * 2.0) / -3.0) / a elif b <= 2.8e-87: tmp = (b - math.sqrt((c * (-3.0 * a)))) / (-3.0 * a) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= -160000000.0) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); elseif (b <= 2.8e-87) tmp = Float64(Float64(b - sqrt(Float64(c * Float64(-3.0 * a)))) / Float64(-3.0 * a)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -160000000.0) tmp = ((b * 2.0) / -3.0) / a; elseif (b <= 2.8e-87) tmp = (b - sqrt((c * (-3.0 * a)))) / (-3.0 * a); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -160000000.0], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 2.8e-87], N[(N[(b - N[Sqrt[N[(c * N[(-3.0 * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(-3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -160000000:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-87}:\\
\;\;\;\;\frac{b - \sqrt{c \cdot \left(-3 \cdot a\right)}}{-3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < -1.6e8Initial program 59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-*l*59.0%
Simplified59.0%
Taylor expanded in b around -inf 89.7%
*-commutative89.7%
Simplified89.7%
associate-*l/89.8%
Applied egg-rr89.8%
metadata-eval89.8%
associate-/l*89.9%
Applied egg-rr89.9%
if -1.6e8 < b < 2.8000000000000001e-87Initial program 71.4%
sqr-neg71.4%
sqr-neg71.4%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in b around 0 64.7%
*-un-lft-identity64.7%
frac-2neg64.7%
distribute-neg-in64.7%
add-sqr-sqrt41.5%
sqrt-unprod64.4%
sqr-neg64.4%
sqrt-unprod23.3%
add-sqr-sqrt63.1%
sub-neg63.1%
add-sqr-sqrt39.8%
sqrt-unprod63.1%
sqr-neg63.1%
sqrt-unprod23.2%
add-sqr-sqrt64.7%
associate-*r*64.8%
*-commutative64.8%
*-commutative64.8%
distribute-lft-neg-in64.8%
metadata-eval64.8%
*-commutative64.8%
Applied egg-rr64.8%
*-lft-identity64.8%
Simplified64.8%
if 2.8000000000000001e-87 < b Initial program 16.7%
sqr-neg16.7%
sqr-neg16.7%
associate-*l*16.7%
Simplified16.7%
Taylor expanded in b around inf 83.9%
*-commutative83.9%
Simplified83.9%
Final simplification79.4%
(FPCore (a b c) :precision binary64 (if (<= b 8.8e-305) (/ (/ (* b 2.0) -3.0) a) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= 8.8e-305) {
tmp = ((b * 2.0) / -3.0) / a;
} else {
tmp = (c / b) * -0.5;
}
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-305) then
tmp = ((b * 2.0d0) / (-3.0d0)) / a
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 8.8e-305) {
tmp = ((b * 2.0) / -3.0) / a;
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 8.8e-305: tmp = ((b * 2.0) / -3.0) / a else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 8.8e-305) tmp = Float64(Float64(Float64(b * 2.0) / -3.0) / a); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 8.8e-305) tmp = ((b * 2.0) / -3.0) / a; else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 8.8e-305], N[(N[(N[(b * 2.0), $MachinePrecision] / -3.0), $MachinePrecision] / a), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.8 \cdot 10^{-305}:\\
\;\;\;\;\frac{\frac{b \cdot 2}{-3}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < 8.79999999999999987e-305Initial program 65.8%
sqr-neg65.8%
sqr-neg65.8%
associate-*l*65.7%
Simplified65.7%
Taylor expanded in b around -inf 62.1%
*-commutative62.1%
Simplified62.1%
associate-*l/62.2%
Applied egg-rr62.2%
metadata-eval62.2%
associate-/l*62.3%
Applied egg-rr62.3%
if 8.79999999999999987e-305 < b Initial program 29.4%
sqr-neg29.4%
sqr-neg29.4%
associate-*l*29.4%
Simplified29.4%
Taylor expanded in b around inf 64.7%
*-commutative64.7%
Simplified64.7%
Final simplification63.4%
(FPCore (a b c) :precision binary64 (if (<= b 1.7e-304) (* -0.6666666666666666 (/ b a)) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.7e-304) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = (c / b) * -0.5;
}
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-304) then
tmp = (-0.6666666666666666d0) * (b / a)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 1.7e-304) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.7e-304: tmp = -0.6666666666666666 * (b / a) else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.7e-304) tmp = Float64(-0.6666666666666666 * Float64(b / a)); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 1.7e-304) tmp = -0.6666666666666666 * (b / a); else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.7e-304], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.7 \cdot 10^{-304}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < 1.6999999999999999e-304Initial program 65.8%
sqr-neg65.8%
sqr-neg65.8%
associate-*l*65.7%
Simplified65.7%
Taylor expanded in b around -inf 62.1%
*-commutative62.1%
Simplified62.1%
if 1.6999999999999999e-304 < b Initial program 29.4%
sqr-neg29.4%
sqr-neg29.4%
associate-*l*29.4%
Simplified29.4%
Taylor expanded in b around inf 64.7%
*-commutative64.7%
Simplified64.7%
Final simplification63.3%
(FPCore (a b c) :precision binary64 (if (<= b 8.8e-305) (/ (* b -0.6666666666666666) a) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
double tmp;
if (b <= 8.8e-305) {
tmp = (b * -0.6666666666666666) / a;
} else {
tmp = (c / b) * -0.5;
}
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-305) then
tmp = (b * (-0.6666666666666666d0)) / a
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= 8.8e-305) {
tmp = (b * -0.6666666666666666) / a;
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 8.8e-305: tmp = (b * -0.6666666666666666) / a else: tmp = (c / b) * -0.5 return tmp
function code(a, b, c) tmp = 0.0 if (b <= 8.8e-305) tmp = Float64(Float64(b * -0.6666666666666666) / a); else tmp = Float64(Float64(c / b) * -0.5); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 8.8e-305) tmp = (b * -0.6666666666666666) / a; else tmp = (c / b) * -0.5; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 8.8e-305], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.8 \cdot 10^{-305}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}
\end{array}
if b < 8.79999999999999987e-305Initial program 65.8%
sqr-neg65.8%
sqr-neg65.8%
associate-*l*65.7%
Simplified65.7%
Taylor expanded in b around -inf 62.1%
*-commutative62.1%
Simplified62.1%
associate-*l/62.2%
Applied egg-rr62.2%
if 8.79999999999999987e-305 < b Initial program 29.4%
sqr-neg29.4%
sqr-neg29.4%
associate-*l*29.4%
Simplified29.4%
Taylor expanded in b around inf 64.7%
*-commutative64.7%
Simplified64.7%
Final simplification63.3%
(FPCore (a b c) :precision binary64 (* b (/ -0.6666666666666666 a)))
double code(double a, double b, double c) {
return b * (-0.6666666666666666 / 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 * ((-0.6666666666666666d0) / a)
end function
public static double code(double a, double b, double c) {
return b * (-0.6666666666666666 / a);
}
def code(a, b, c): return b * (-0.6666666666666666 / a)
function code(a, b, c) return Float64(b * Float64(-0.6666666666666666 / a)) end
function tmp = code(a, b, c) tmp = b * (-0.6666666666666666 / a); end
code[a_, b_, c_] := N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \frac{-0.6666666666666666}{a}
\end{array}
Initial program 49.1%
sqr-neg49.1%
sqr-neg49.1%
associate-*l*49.1%
Simplified49.1%
Taylor expanded in b around -inf 35.0%
*-commutative35.0%
Simplified35.0%
*-commutative35.0%
clear-num35.0%
un-div-inv35.0%
Applied egg-rr35.0%
associate-/r/34.9%
Simplified34.9%
Final simplification34.9%
(FPCore (a b c) :precision binary64 (* -0.6666666666666666 (/ b a)))
double code(double a, double b, double c) {
return -0.6666666666666666 * (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 = (-0.6666666666666666d0) * (b / a)
end function
public static double code(double a, double b, double c) {
return -0.6666666666666666 * (b / a);
}
def code(a, b, c): return -0.6666666666666666 * (b / a)
function code(a, b, c) return Float64(-0.6666666666666666 * Float64(b / a)) end
function tmp = code(a, b, c) tmp = -0.6666666666666666 * (b / a); end
code[a_, b_, c_] := N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.6666666666666666 \cdot \frac{b}{a}
\end{array}
Initial program 49.1%
sqr-neg49.1%
sqr-neg49.1%
associate-*l*49.1%
Simplified49.1%
Taylor expanded in b around -inf 35.0%
*-commutative35.0%
Simplified35.0%
Final simplification35.0%
herbie shell --seed 2024056
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))