
(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 15 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 -1.4e+69)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 1.26e-76)
(/ (- (/ (sqrt (+ (* b b) (* c (* a -3.0)))) 3.0) (/ b 3.0)) a)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.4e+69) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 1.26e-76) {
tmp = ((sqrt(((b * b) + (c * (a * -3.0)))) / 3.0) - (b / 3.0)) / 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.4d+69)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 1.26d-76) then
tmp = ((sqrt(((b * b) + (c * (a * (-3.0d0))))) / 3.0d0) - (b / 3.0d0)) / 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.4e+69) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 1.26e-76) {
tmp = ((Math.sqrt(((b * b) + (c * (a * -3.0)))) / 3.0) - (b / 3.0)) / a;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.4e+69: tmp = (b * -2.0) / (3.0 * a) elif b <= 1.26e-76: tmp = ((math.sqrt(((b * b) + (c * (a * -3.0)))) / 3.0) - (b / 3.0)) / a else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.4e+69) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 1.26e-76) tmp = Float64(Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -3.0)))) / 3.0) - Float64(b / 3.0)) / 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.4e+69) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 1.26e-76) tmp = ((sqrt(((b * b) + (c * (a * -3.0)))) / 3.0) - (b / 3.0)) / a; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.4e+69], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.26e-76], N[(N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 3.0), $MachinePrecision] - N[(b / 3.0), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+69}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 1.26 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3} - \frac{b}{3}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.39999999999999991e69Initial program 55.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6455.7%
Simplified55.7%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6495.8%
Simplified95.8%
if -1.39999999999999991e69 < b < 1.26e-76Initial program 82.1%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6482.1%
Simplified82.1%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.2%
Applied egg-rr82.2%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6482.2%
Applied egg-rr82.2%
if 1.26e-76 < b Initial program 15.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6415.4%
Simplified15.4%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
(FPCore (a b c)
:precision binary64
(if (<= b -1.3e+95)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 8e-76)
(/ (/ (- (pow (+ (* b b) (* c (* a -3.0))) 0.5) b) a) 3.0)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.3e+95) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 8e-76) {
tmp = ((pow(((b * b) + (c * (a * -3.0))), 0.5) - 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.3d+95)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 8d-76) then
tmp = (((((b * b) + (c * (a * (-3.0d0)))) ** 0.5d0) - 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.3e+95) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 8e-76) {
tmp = ((Math.pow(((b * b) + (c * (a * -3.0))), 0.5) - b) / a) / 3.0;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.3e+95: tmp = (b * -2.0) / (3.0 * a) elif b <= 8e-76: tmp = ((math.pow(((b * b) + (c * (a * -3.0))), 0.5) - b) / a) / 3.0 else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.3e+95) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 8e-76) tmp = Float64(Float64(Float64((Float64(Float64(b * b) + Float64(c * Float64(a * -3.0))) ^ 0.5) - b) / 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.3e+95) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 8e-76) tmp = (((((b * b) + (c * (a * -3.0))) ^ 0.5) - b) / a) / 3.0; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.3e+95], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e-76], N[(N[(N[(N[Power[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+95}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{{\left(b \cdot b + c \cdot \left(a \cdot -3\right)\right)}^{0.5} - b}{a}}{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.29999999999999995e95Initial program 53.0%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6453.0%
Simplified53.0%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6495.5%
Simplified95.5%
if -1.29999999999999995e95 < b < 7.99999999999999942e-76Initial program 82.8%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6482.8%
Simplified82.8%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.9%
Applied egg-rr82.9%
pow1/2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.9%
Applied egg-rr82.9%
if 7.99999999999999942e-76 < b Initial program 15.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6415.4%
Simplified15.4%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
(FPCore (a b c)
:precision binary64
(if (<= b -1e+95)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 6.2e-76)
(/ (/ (- (sqrt (+ (* b b) (* c (* a -3.0)))) b) a) 3.0)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1e+95) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 6.2e-76) {
tmp = ((sqrt(((b * b) + (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 <= (-1d+95)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 6.2d-76) then
tmp = ((sqrt(((b * b) + (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 <= -1e+95) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 6.2e-76) {
tmp = ((Math.sqrt(((b * b) + (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 <= -1e+95: tmp = (b * -2.0) / (3.0 * a) elif b <= 6.2e-76: tmp = ((math.sqrt(((b * b) + (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 <= -1e+95) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 6.2e-76) tmp = Float64(Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -3.0)))) - b) / 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 <= -1e+95) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 6.2e-76) tmp = ((sqrt(((b * b) + (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, -1e+95], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e-76], N[(N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+95}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.00000000000000002e95Initial program 53.0%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6453.0%
Simplified53.0%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6495.5%
Simplified95.5%
if -1.00000000000000002e95 < b < 6.19999999999999939e-76Initial program 82.8%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6482.8%
Simplified82.8%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.9%
Applied egg-rr82.9%
if 6.19999999999999939e-76 < b Initial program 15.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6415.4%
Simplified15.4%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
(FPCore (a b c)
:precision binary64
(if (<= b -9.5e+72)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 3e-76)
(/ (/ (- (sqrt (+ (* b b) (* c (* a -3.0)))) b) 3.0) a)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -9.5e+72) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 3e-76) {
tmp = ((sqrt(((b * b) + (c * (a * -3.0)))) - b) / 3.0) / 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 <= (-9.5d+72)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 3d-76) then
tmp = ((sqrt(((b * b) + (c * (a * (-3.0d0))))) - b) / 3.0d0) / 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 <= -9.5e+72) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 3e-76) {
tmp = ((Math.sqrt(((b * b) + (c * (a * -3.0)))) - b) / 3.0) / a;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -9.5e+72: tmp = (b * -2.0) / (3.0 * a) elif b <= 3e-76: tmp = ((math.sqrt(((b * b) + (c * (a * -3.0)))) - b) / 3.0) / a else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -9.5e+72) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 3e-76) tmp = Float64(Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -3.0)))) - b) / 3.0) / 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 <= -9.5e+72) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 3e-76) tmp = ((sqrt(((b * b) + (c * (a * -3.0)))) - b) / 3.0) / a; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -9.5e+72], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-76], N[(N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / 3.0), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+72}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -9.50000000000000054e72Initial program 55.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6455.7%
Simplified55.7%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6495.8%
Simplified95.8%
if -9.50000000000000054e72 < b < 3.00000000000000024e-76Initial program 82.1%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6482.1%
Simplified82.1%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.2%
Applied egg-rr82.2%
if 3.00000000000000024e-76 < b Initial program 15.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6415.4%
Simplified15.4%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
(FPCore (a b c)
:precision binary64
(if (<= b -8.6e+94)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 5.5e-77)
(/ (- (sqrt (+ (* b b) (* c (* a -3.0)))) b) (* 3.0 a))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -8.6e+94) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 5.5e-77) {
tmp = (sqrt(((b * b) + (c * (a * -3.0)))) - b) / (3.0 * 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 <= (-8.6d+94)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 5.5d-77) then
tmp = (sqrt(((b * b) + (c * (a * (-3.0d0))))) - b) / (3.0d0 * 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 <= -8.6e+94) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 5.5e-77) {
tmp = (Math.sqrt(((b * b) + (c * (a * -3.0)))) - b) / (3.0 * a);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -8.6e+94: tmp = (b * -2.0) / (3.0 * a) elif b <= 5.5e-77: tmp = (math.sqrt(((b * b) + (c * (a * -3.0)))) - b) / (3.0 * a) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -8.6e+94) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 5.5e-77) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -3.0)))) - b) / Float64(3.0 * 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 <= -8.6e+94) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 5.5e-77) tmp = (sqrt(((b * b) + (c * (a * -3.0)))) - b) / (3.0 * a); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -8.6e+94], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e-77], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.6 \cdot 10^{+94}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -8.6e94Initial program 53.0%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6453.0%
Simplified53.0%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6495.5%
Simplified95.5%
if -8.6e94 < b < 5.49999999999999998e-77Initial program 82.8%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6482.8%
Simplified82.8%
if 5.49999999999999998e-77 < b Initial program 15.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6415.4%
Simplified15.4%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
(FPCore (a b c)
:precision binary64
(if (<= b -3.8e+81)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 5.6e-77)
(* (/ (- (sqrt (+ (* b b) (* c (* a -3.0)))) b) a) 0.3333333333333333)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -3.8e+81) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 5.6e-77) {
tmp = ((sqrt(((b * b) + (c * (a * -3.0)))) - b) / a) * 0.3333333333333333;
} 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 <= (-3.8d+81)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 5.6d-77) then
tmp = ((sqrt(((b * b) + (c * (a * (-3.0d0))))) - b) / a) * 0.3333333333333333d0
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 <= -3.8e+81) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 5.6e-77) {
tmp = ((Math.sqrt(((b * b) + (c * (a * -3.0)))) - b) / a) * 0.3333333333333333;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -3.8e+81: tmp = (b * -2.0) / (3.0 * a) elif b <= 5.6e-77: tmp = ((math.sqrt(((b * b) + (c * (a * -3.0)))) - b) / a) * 0.3333333333333333 else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -3.8e+81) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 5.6e-77) tmp = Float64(Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -3.0)))) - b) / a) * 0.3333333333333333); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -3.8e+81) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 5.6e-77) tmp = ((sqrt(((b * b) + (c * (a * -3.0)))) - b) / a) * 0.3333333333333333; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -3.8e+81], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-77], N[(N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{+81}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-77}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -3.8e81Initial program 54.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6454.4%
Simplified54.4%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6495.7%
Simplified95.7%
if -3.8e81 < b < 5.5999999999999999e-77Initial program 82.5%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6482.5%
Simplified82.5%
associate-/l/N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval82.4%
Applied egg-rr82.4%
if 5.5999999999999999e-77 < b Initial program 15.4%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6415.4%
Simplified15.4%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
(FPCore (a b c)
:precision binary64
(if (<= b -4.2e-10)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 9.5e-131)
(/ (/ (- (pow (* c (* a -3.0)) 0.5) b) a) 3.0)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -4.2e-10) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
tmp = ((pow((c * (a * -3.0)), 0.5) - 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 <= (-4.2d-10)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 9.5d-131) then
tmp = ((((c * (a * (-3.0d0))) ** 0.5d0) - 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 <= -4.2e-10) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
tmp = ((Math.pow((c * (a * -3.0)), 0.5) - b) / a) / 3.0;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -4.2e-10: tmp = (b * -2.0) / (3.0 * a) elif b <= 9.5e-131: tmp = ((math.pow((c * (a * -3.0)), 0.5) - b) / a) / 3.0 else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -4.2e-10) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 9.5e-131) tmp = Float64(Float64(Float64((Float64(c * Float64(a * -3.0)) ^ 0.5) - b) / 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 <= -4.2e-10) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 9.5e-131) tmp = ((((c * (a * -3.0)) ^ 0.5) - b) / a) / 3.0; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -4.2e-10], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-131], N[(N[(N[(N[Power[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-131}:\\
\;\;\;\;\frac{\frac{{\left(c \cdot \left(a \cdot -3\right)\right)}^{0.5} - b}{a}}{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -4.2e-10Initial program 62.5%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
if -4.2e-10 < b < 9.4999999999999996e-131Initial program 85.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6485.7%
Simplified85.7%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.8%
Applied egg-rr85.8%
Taylor expanded in b around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.0%
Simplified72.0%
pow1/2N/A
*-commutativeN/A
associate-*r*N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.0%
Applied egg-rr72.0%
if 9.4999999999999996e-131 < b Initial program 18.6%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6418.6%
Simplified18.6%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
(FPCore (a b c)
:precision binary64
(if (<= b -1.15e-7)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 9.5e-131)
(/ (/ (- (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.15e-7) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
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.15d-7)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 9.5d-131) 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.15e-7) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
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.15e-7: tmp = (b * -2.0) / (3.0 * a) elif b <= 9.5e-131: 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.15e-7) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 9.5e-131) tmp = Float64(Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / 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.15e-7) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 9.5e-131) 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.15e-7], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-131], N[(N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{-7}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-131}:\\
\;\;\;\;\frac{\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a}}{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -1.14999999999999997e-7Initial program 62.5%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
if -1.14999999999999997e-7 < b < 9.4999999999999996e-131Initial program 85.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6485.7%
Simplified85.7%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.8%
Applied egg-rr85.8%
Taylor expanded in b around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.0%
Simplified72.0%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6472.0%
Applied egg-rr72.0%
if 9.4999999999999996e-131 < b Initial program 18.6%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6418.6%
Simplified18.6%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
Final simplification81.4%
(FPCore (a b c)
:precision binary64
(if (<= b -3200000.0)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 8.6e-131)
(/ (/ (- (sqrt (* -3.0 (* a c))) b) a) 3.0)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -3200000.0) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 8.6e-131) {
tmp = ((sqrt((-3.0 * (a * 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 <= (-3200000.0d0)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 8.6d-131) then
tmp = ((sqrt(((-3.0d0) * (a * 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 <= -3200000.0) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 8.6e-131) {
tmp = ((Math.sqrt((-3.0 * (a * c))) - b) / a) / 3.0;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -3200000.0: tmp = (b * -2.0) / (3.0 * a) elif b <= 8.6e-131: tmp = ((math.sqrt((-3.0 * (a * c))) - b) / a) / 3.0 else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -3200000.0) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 8.6e-131) tmp = Float64(Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / 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 <= -3200000.0) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 8.6e-131) tmp = ((sqrt((-3.0 * (a * c))) - b) / a) / 3.0; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -3200000.0], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.6e-131], N[(N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3200000:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-131}:\\
\;\;\;\;\frac{\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a}}{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -3.2e6Initial program 62.5%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
if -3.2e6 < b < 8.60000000000000038e-131Initial program 85.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6485.7%
Simplified85.7%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.8%
Applied egg-rr85.8%
Taylor expanded in b around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.0%
Simplified72.0%
if 8.60000000000000038e-131 < b Initial program 18.6%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6418.6%
Simplified18.6%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
Final simplification81.4%
(FPCore (a b c)
:precision binary64
(if (<= b -0.0024)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 9.5e-131)
(/ (/ (- (sqrt (* -3.0 (* a c))) b) 3.0) a)
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -0.0024) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
tmp = ((sqrt((-3.0 * (a * c))) - b) / 3.0) / 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 <= (-0.0024d0)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 9.5d-131) then
tmp = ((sqrt(((-3.0d0) * (a * c))) - b) / 3.0d0) / 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 <= -0.0024) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
tmp = ((Math.sqrt((-3.0 * (a * c))) - b) / 3.0) / a;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -0.0024: tmp = (b * -2.0) / (3.0 * a) elif b <= 9.5e-131: tmp = ((math.sqrt((-3.0 * (a * c))) - b) / 3.0) / a else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -0.0024) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 9.5e-131) tmp = Float64(Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / 3.0) / 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 <= -0.0024) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 9.5e-131) tmp = ((sqrt((-3.0 * (a * c))) - b) / 3.0) / a; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -0.0024], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-131], N[(N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / 3.0), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.0024:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-131}:\\
\;\;\;\;\frac{\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{3}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -0.00239999999999999979Initial program 62.5%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
if -0.00239999999999999979 < b < 9.4999999999999996e-131Initial program 85.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6485.7%
Simplified85.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.7%
Applied egg-rr85.7%
Taylor expanded in b around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.9%
Simplified71.9%
if 9.4999999999999996e-131 < b Initial program 18.6%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6418.6%
Simplified18.6%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
Final simplification81.4%
(FPCore (a b c)
:precision binary64
(if (<= b -6.5e-12)
(/ (* b -2.0) (* 3.0 a))
(if (<= b 9.5e-131)
(/ (- (sqrt (* a (* c -3.0))) b) (* 3.0 a))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -6.5e-12) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
tmp = (sqrt((a * (c * -3.0))) - b) / (3.0 * 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 <= (-6.5d-12)) then
tmp = (b * (-2.0d0)) / (3.0d0 * a)
else if (b <= 9.5d-131) then
tmp = (sqrt((a * (c * (-3.0d0)))) - b) / (3.0d0 * 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 <= -6.5e-12) {
tmp = (b * -2.0) / (3.0 * a);
} else if (b <= 9.5e-131) {
tmp = (Math.sqrt((a * (c * -3.0))) - b) / (3.0 * a);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -6.5e-12: tmp = (b * -2.0) / (3.0 * a) elif b <= 9.5e-131: tmp = (math.sqrt((a * (c * -3.0))) - b) / (3.0 * a) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -6.5e-12) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a)); elseif (b <= 9.5e-131) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / Float64(3.0 * 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 <= -6.5e-12) tmp = (b * -2.0) / (3.0 * a); elseif (b <= 9.5e-131) tmp = (sqrt((a * (c * -3.0))) - b) / (3.0 * a); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -6.5e-12], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-131], N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-131}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < -6.5000000000000002e-12Initial program 62.5%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
if -6.5000000000000002e-12 < b < 9.4999999999999996e-131Initial program 85.7%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6485.7%
Simplified85.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.9%
Simplified71.9%
if 9.4999999999999996e-131 < b Initial program 18.6%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6418.6%
Simplified18.6%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
(FPCore (a b c) :precision binary64 (if (<= b 1.28e-285) (/ (* b -2.0) (* 3.0 a)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.28e-285) {
tmp = (b * -2.0) / (3.0 * 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.28d-285) then
tmp = (b * (-2.0d0)) / (3.0d0 * 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.28e-285) {
tmp = (b * -2.0) / (3.0 * a);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.28e-285: tmp = (b * -2.0) / (3.0 * a) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.28e-285) tmp = Float64(Float64(b * -2.0) / Float64(3.0 * 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.28e-285) tmp = (b * -2.0) / (3.0 * a); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.28e-285], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.28 \cdot 10^{-285}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < 1.28000000000000003e-285Initial program 73.2%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6473.2%
Simplified73.2%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f6467.1%
Simplified67.1%
if 1.28000000000000003e-285 < b Initial program 26.0%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6426.0%
Simplified26.0%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.3%
Simplified70.3%
(FPCore (a b c) :precision binary64 (if (<= b 6.5e-283) (/ b (/ a -0.6666666666666666)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 6.5e-283) {
tmp = b / (a / -0.6666666666666666);
} 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 <= 6.5d-283) then
tmp = b / (a / (-0.6666666666666666d0))
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 <= 6.5e-283) {
tmp = b / (a / -0.6666666666666666);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 6.5e-283: tmp = b / (a / -0.6666666666666666) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 6.5e-283) tmp = Float64(b / Float64(a / -0.6666666666666666)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= 6.5e-283) tmp = b / (a / -0.6666666666666666); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 6.5e-283], N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.5 \cdot 10^{-283}:\\
\;\;\;\;\frac{b}{\frac{a}{-0.6666666666666666}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
if b < 6.50000000000000031e-283Initial program 73.2%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6473.2%
Simplified73.2%
Taylor expanded in b around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6467.0%
Simplified67.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6467.0%
Applied egg-rr67.0%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6467.0%
Applied egg-rr67.0%
if 6.50000000000000031e-283 < b Initial program 26.0%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6426.0%
Simplified26.0%
Taylor expanded in b around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.3%
Simplified70.3%
(FPCore (a b c) :precision binary64 (/ -0.6666666666666666 (/ a b)))
double code(double a, double b, double c) {
return -0.6666666666666666 / (a / b);
}
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) / (a / b)
end function
public static double code(double a, double b, double c) {
return -0.6666666666666666 / (a / b);
}
def code(a, b, c): return -0.6666666666666666 / (a / b)
function code(a, b, c) return Float64(-0.6666666666666666 / Float64(a / b)) end
function tmp = code(a, b, c) tmp = -0.6666666666666666 / (a / b); end
code[a_, b_, c_] := N[(-0.6666666666666666 / N[(a / b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.6666666666666666}{\frac{a}{b}}
\end{array}
Initial program 51.1%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6451.1%
Simplified51.1%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.1%
Applied egg-rr51.1%
Taylor expanded in b around -inf
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6436.9%
Simplified36.9%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6436.9%
Applied egg-rr36.9%
(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 51.1%
/-lowering-/.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6451.1%
Simplified51.1%
Taylor expanded in b around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6436.9%
Simplified36.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6436.9%
Applied egg-rr36.9%
Final simplification36.9%
herbie shell --seed 2024161
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))