
(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
(if (<= b -1.65e+109)
(/ (/ b -1.5) a)
(if (<= b 2.95e-274)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(if (<= b 3.6e-218)
(/ (+ b (+ (hypot b (* (sqrt (* c -3.0)) (sqrt a))) (+ b b))) (* a 3.0))
(if (<= b 1.4e-44)
(pow
(/ a (* (+ b (hypot b (sqrt (* c (* a -3.0))))) 0.3333333333333333))
-1.0)
(/ (* c -0.5) b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.65e+109) {
tmp = (b / -1.5) / a;
} else if (b <= 2.95e-274) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.6e-218) {
tmp = (b + (hypot(b, (sqrt((c * -3.0)) * sqrt(a))) + (b + b))) / (a * 3.0);
} else if (b <= 1.4e-44) {
tmp = pow((a / ((b + hypot(b, sqrt((c * (a * -3.0))))) * 0.3333333333333333)), -1.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.65e+109) {
tmp = (b / -1.5) / a;
} else if (b <= 2.95e-274) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.6e-218) {
tmp = (b + (Math.hypot(b, (Math.sqrt((c * -3.0)) * Math.sqrt(a))) + (b + b))) / (a * 3.0);
} else if (b <= 1.4e-44) {
tmp = Math.pow((a / ((b + Math.hypot(b, Math.sqrt((c * (a * -3.0))))) * 0.3333333333333333)), -1.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.65e+109: tmp = (b / -1.5) / a elif b <= 2.95e-274: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) elif b <= 3.6e-218: tmp = (b + (math.hypot(b, (math.sqrt((c * -3.0)) * math.sqrt(a))) + (b + b))) / (a * 3.0) elif b <= 1.4e-44: tmp = math.pow((a / ((b + math.hypot(b, math.sqrt((c * (a * -3.0))))) * 0.3333333333333333)), -1.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.65e+109) tmp = Float64(Float64(b / -1.5) / a); elseif (b <= 2.95e-274) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); elseif (b <= 3.6e-218) tmp = Float64(Float64(b + Float64(hypot(b, Float64(sqrt(Float64(c * -3.0)) * sqrt(a))) + Float64(b + b))) / Float64(a * 3.0)); elseif (b <= 1.4e-44) tmp = Float64(a / Float64(Float64(b + hypot(b, sqrt(Float64(c * Float64(a * -3.0))))) * 0.3333333333333333)) ^ -1.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.65e+109) tmp = (b / -1.5) / a; elseif (b <= 2.95e-274) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); elseif (b <= 3.6e-218) tmp = (b + (hypot(b, (sqrt((c * -3.0)) * sqrt(a))) + (b + b))) / (a * 3.0); elseif (b <= 1.4e-44) tmp = (a / ((b + hypot(b, sqrt((c * (a * -3.0))))) * 0.3333333333333333)) ^ -1.0; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.65e+109], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 2.95e-274], 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, 3.6e-218], N[(N[(b + N[(N[Sqrt[b ^ 2 + N[(N[Sqrt[N[(c * -3.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] + N[(b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-44], N[Power[N[(a / N[(N[(b + N[Sqrt[b ^ 2 + N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+109}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\
\mathbf{elif}\;b \leq 2.95 \cdot 10^{-274}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{-218}:\\
\;\;\;\;\frac{b + \left(\mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right) + \left(b + b\right)\right)}{a \cdot 3}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-44}:\\
\;\;\;\;{\left(\frac{a}{\left(b + \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right) \cdot 0.3333333333333333}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -2.4e+107)
(/ (/ b -1.5) a)
(if (<= b 1.7e-273)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(if (<= b 3.4e-218)
(*
(- (hypot b (* (sqrt (* c -3.0)) (sqrt a))) b)
(/ 0.3333333333333333 a))
(if (<= b 5.3e-46)
(pow
(/ a (* (+ b (hypot b (sqrt (* c (* a -3.0))))) 0.3333333333333333))
-1.0)
(/ (* c -0.5) b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -2.4e+107) {
tmp = (b / -1.5) / a;
} else if (b <= 1.7e-273) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.4e-218) {
tmp = (hypot(b, (sqrt((c * -3.0)) * sqrt(a))) - b) * (0.3333333333333333 / a);
} else if (b <= 5.3e-46) {
tmp = pow((a / ((b + hypot(b, sqrt((c * (a * -3.0))))) * 0.3333333333333333)), -1.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
public static double code(double a, double b, double c) {
double tmp;
if (b <= -2.4e+107) {
tmp = (b / -1.5) / a;
} else if (b <= 1.7e-273) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.4e-218) {
tmp = (Math.hypot(b, (Math.sqrt((c * -3.0)) * Math.sqrt(a))) - b) * (0.3333333333333333 / a);
} else if (b <= 5.3e-46) {
tmp = Math.pow((a / ((b + Math.hypot(b, Math.sqrt((c * (a * -3.0))))) * 0.3333333333333333)), -1.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -2.4e+107: tmp = (b / -1.5) / a elif b <= 1.7e-273: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) elif b <= 3.4e-218: tmp = (math.hypot(b, (math.sqrt((c * -3.0)) * math.sqrt(a))) - b) * (0.3333333333333333 / a) elif b <= 5.3e-46: tmp = math.pow((a / ((b + math.hypot(b, math.sqrt((c * (a * -3.0))))) * 0.3333333333333333)), -1.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -2.4e+107) tmp = Float64(Float64(b / -1.5) / a); elseif (b <= 1.7e-273) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); elseif (b <= 3.4e-218) tmp = Float64(Float64(hypot(b, Float64(sqrt(Float64(c * -3.0)) * sqrt(a))) - b) * Float64(0.3333333333333333 / a)); elseif (b <= 5.3e-46) tmp = Float64(a / Float64(Float64(b + hypot(b, sqrt(Float64(c * Float64(a * -3.0))))) * 0.3333333333333333)) ^ -1.0; else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2.4e+107) tmp = (b / -1.5) / a; elseif (b <= 1.7e-273) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); elseif (b <= 3.4e-218) tmp = (hypot(b, (sqrt((c * -3.0)) * sqrt(a))) - b) * (0.3333333333333333 / a); elseif (b <= 5.3e-46) tmp = (a / ((b + hypot(b, sqrt((c * (a * -3.0))))) * 0.3333333333333333)) ^ -1.0; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -2.4e+107], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.7e-273], 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, 3.4e-218], N[(N[(N[Sqrt[b ^ 2 + N[(N[Sqrt[N[(c * -3.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.3e-46], N[Power[N[(a / N[(N[(b + N[Sqrt[b ^ 2 + N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+107}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-273}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-218}:\\
\;\;\;\;\left(\mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right) - b\right) \cdot \frac{0.3333333333333333}{a}\\
\mathbf{elif}\;b \leq 5.3 \cdot 10^{-46}:\\
\;\;\;\;{\left(\frac{a}{\left(b + \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right) \cdot 0.3333333333333333}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -1.7e+109)
(/ (/ b -1.5) a)
(if (<= b 1.45e-275)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(if (<= b 3.9e-218)
(*
0.3333333333333333
(/ (- (hypot b (* (sqrt (* c -3.0)) (sqrt a))) b) a))
(if (<= b 6e-44)
(/ 1.0 (/ a (/ (+ (* b 3.0) (hypot b (sqrt (* a (* c -3.0))))) 3.0)))
(/ (* c -0.5) b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.7e+109) {
tmp = (b / -1.5) / a;
} else if (b <= 1.45e-275) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.9e-218) {
tmp = 0.3333333333333333 * ((hypot(b, (sqrt((c * -3.0)) * sqrt(a))) - b) / a);
} else if (b <= 6e-44) {
tmp = 1.0 / (a / (((b * 3.0) + hypot(b, sqrt((a * (c * -3.0))))) / 3.0));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.7e+109) {
tmp = (b / -1.5) / a;
} else if (b <= 1.45e-275) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.9e-218) {
tmp = 0.3333333333333333 * ((Math.hypot(b, (Math.sqrt((c * -3.0)) * Math.sqrt(a))) - b) / a);
} else if (b <= 6e-44) {
tmp = 1.0 / (a / (((b * 3.0) + Math.hypot(b, Math.sqrt((a * (c * -3.0))))) / 3.0));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.7e+109: tmp = (b / -1.5) / a elif b <= 1.45e-275: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) elif b <= 3.9e-218: tmp = 0.3333333333333333 * ((math.hypot(b, (math.sqrt((c * -3.0)) * math.sqrt(a))) - b) / a) elif b <= 6e-44: tmp = 1.0 / (a / (((b * 3.0) + math.hypot(b, math.sqrt((a * (c * -3.0))))) / 3.0)) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.7e+109) tmp = Float64(Float64(b / -1.5) / a); elseif (b <= 1.45e-275) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); elseif (b <= 3.9e-218) tmp = Float64(0.3333333333333333 * Float64(Float64(hypot(b, Float64(sqrt(Float64(c * -3.0)) * sqrt(a))) - b) / a)); elseif (b <= 6e-44) tmp = Float64(1.0 / Float64(a / Float64(Float64(Float64(b * 3.0) + hypot(b, sqrt(Float64(a * Float64(c * -3.0))))) / 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.7e+109) tmp = (b / -1.5) / a; elseif (b <= 1.45e-275) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); elseif (b <= 3.9e-218) tmp = 0.3333333333333333 * ((hypot(b, (sqrt((c * -3.0)) * sqrt(a))) - b) / a); elseif (b <= 6e-44) tmp = 1.0 / (a / (((b * 3.0) + hypot(b, sqrt((a * (c * -3.0))))) / 3.0)); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.7e+109], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.45e-275], 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, 3.9e-218], N[(0.3333333333333333 * N[(N[(N[Sqrt[b ^ 2 + N[(N[Sqrt[N[(c * -3.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-44], N[(1.0 / N[(a / N[(N[(N[(b * 3.0), $MachinePrecision] + N[Sqrt[b ^ 2 + N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+109}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-275}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{-218}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right) - b}{a}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-44}:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{b \cdot 3 + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{3}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -1.7e+109)
(/ (/ b -1.5) a)
(if (<= b 1.45e-275)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(if (<= b 3.9e-218)
(*
(- (hypot b (* (sqrt (* c -3.0)) (sqrt a))) b)
(/ 0.3333333333333333 a))
(if (<= b 6e-46)
(/ 1.0 (/ a (/ (+ (* b 3.0) (hypot b (sqrt (* a (* c -3.0))))) 3.0)))
(/ (* c -0.5) b))))))
double code(double a, double b, double c) {
double tmp;
if (b <= -1.7e+109) {
tmp = (b / -1.5) / a;
} else if (b <= 1.45e-275) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.9e-218) {
tmp = (hypot(b, (sqrt((c * -3.0)) * sqrt(a))) - b) * (0.3333333333333333 / a);
} else if (b <= 6e-46) {
tmp = 1.0 / (a / (((b * 3.0) + hypot(b, sqrt((a * (c * -3.0))))) / 3.0));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
public static double code(double a, double b, double c) {
double tmp;
if (b <= -1.7e+109) {
tmp = (b / -1.5) / a;
} else if (b <= 1.45e-275) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else if (b <= 3.9e-218) {
tmp = (Math.hypot(b, (Math.sqrt((c * -3.0)) * Math.sqrt(a))) - b) * (0.3333333333333333 / a);
} else if (b <= 6e-46) {
tmp = 1.0 / (a / (((b * 3.0) + Math.hypot(b, Math.sqrt((a * (c * -3.0))))) / 3.0));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -1.7e+109: tmp = (b / -1.5) / a elif b <= 1.45e-275: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) elif b <= 3.9e-218: tmp = (math.hypot(b, (math.sqrt((c * -3.0)) * math.sqrt(a))) - b) * (0.3333333333333333 / a) elif b <= 6e-46: tmp = 1.0 / (a / (((b * 3.0) + math.hypot(b, math.sqrt((a * (c * -3.0))))) / 3.0)) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -1.7e+109) tmp = Float64(Float64(b / -1.5) / a); elseif (b <= 1.45e-275) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); elseif (b <= 3.9e-218) tmp = Float64(Float64(hypot(b, Float64(sqrt(Float64(c * -3.0)) * sqrt(a))) - b) * Float64(0.3333333333333333 / a)); elseif (b <= 6e-46) tmp = Float64(1.0 / Float64(a / Float64(Float64(Float64(b * 3.0) + hypot(b, sqrt(Float64(a * Float64(c * -3.0))))) / 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.7e+109) tmp = (b / -1.5) / a; elseif (b <= 1.45e-275) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); elseif (b <= 3.9e-218) tmp = (hypot(b, (sqrt((c * -3.0)) * sqrt(a))) - b) * (0.3333333333333333 / a); elseif (b <= 6e-46) tmp = 1.0 / (a / (((b * 3.0) + hypot(b, sqrt((a * (c * -3.0))))) / 3.0)); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -1.7e+109], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.45e-275], 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, 3.9e-218], N[(N[(N[Sqrt[b ^ 2 + N[(N[Sqrt[N[(c * -3.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-46], N[(1.0 / N[(a / N[(N[(N[(b * 3.0), $MachinePrecision] + N[Sqrt[b ^ 2 + N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+109}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-275}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{-218}:\\
\;\;\;\;\left(\mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right) - b\right) \cdot \frac{0.3333333333333333}{a}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-46}:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{b \cdot 3 + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{3}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -9e+108)
(/ (/ b -1.5) a)
(if (<= b 4.8e-45)
(/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -9e+108) {
tmp = (b / -1.5) / a;
} else if (b <= 4.8e-45) {
tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-9d+108)) then
tmp = (b / (-1.5d0)) / a
else if (b <= 4.8d-45) then
tmp = (sqrt(((b * b) - ((a * 3.0d0) * c))) - b) / (a * 3.0d0)
else
tmp = (c * (-0.5d0)) / b
end if
code = tmp
end function
public static double code(double a, double b, double c) {
double tmp;
if (b <= -9e+108) {
tmp = (b / -1.5) / a;
} else if (b <= 4.8e-45) {
tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -9e+108: tmp = (b / -1.5) / a elif b <= 4.8e-45: tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -9e+108) tmp = Float64(Float64(b / -1.5) / a); elseif (b <= 4.8e-45) tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -9e+108) tmp = (b / -1.5) / a; elseif (b <= 4.8e-45) tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -9e+108], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 4.8e-45], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(a * 3.0), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+108}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-45}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -7.6e-81)
(+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
(if (<= b 1.45e-43)
(/ (- (sqrt (* a (* c -3.0))) b) (* a 3.0))
(/ (* c -0.5) b))))
double code(double a, double b, double c) {
double tmp;
if (b <= -7.6e-81) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else if (b <= 1.45e-43) {
tmp = (sqrt((a * (c * -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 <= (-7.6d-81)) then
tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
else if (b <= 1.45d-43) then
tmp = (sqrt((a * (c * (-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 <= -7.6e-81) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else if (b <= 1.45e-43) {
tmp = (Math.sqrt((a * (c * -3.0))) - b) / (a * 3.0);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -7.6e-81: tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)) elif b <= 1.45e-43: tmp = (math.sqrt((a * (c * -3.0))) - b) / (a * 3.0) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -7.6e-81) tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b))); elseif (b <= 1.45e-43) tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -7.6e-81) tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)); elseif (b <= 1.45e-43) tmp = (sqrt((a * (c * -3.0))) - b) / (a * 3.0); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -7.6e-81], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e-43], N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{-81}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-43}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c)
:precision binary64
(if (<= b -2.3e-91)
(+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
(if (<= b 3.6e-44)
(/ (- (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 <= -2.3e-91) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else if (b <= 3.6e-44) {
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 <= (-2.3d-91)) then
tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
else if (b <= 3.6d-44) 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 <= -2.3e-91) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else if (b <= 3.6e-44) {
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 <= -2.3e-91: tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)) elif b <= 3.6e-44: 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 <= -2.3e-91) tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b))); elseif (b <= 3.6e-44) tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(a * 3.0)); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -2.3e-91) tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)); elseif (b <= 3.6e-44) 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, -2.3e-91], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.6e-44], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{-91}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{-44}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c) :precision binary64 (if (<= b -5e-310) (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b))) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= -5e-310) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} 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 <= (-5d-310)) then
tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
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 <= -5e-310) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= -5e-310: tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= -5e-310) tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b))); else tmp = Float64(Float64(c * -0.5) / b); end return tmp end
function tmp_2 = code(a, b, c) tmp = 0.0; if (b <= -5e-310) tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b)); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c) :precision binary64 (if (<= b 2.2e-304) (* -0.6666666666666666 (/ b a)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 2.2e-304) {
tmp = -0.6666666666666666 * (b / 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 <= 2.2d-304) then
tmp = (-0.6666666666666666d0) * (b / 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 <= 2.2e-304) {
tmp = -0.6666666666666666 * (b / a);
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 2.2e-304: tmp = -0.6666666666666666 * (b / a) else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 2.2e-304) tmp = Float64(-0.6666666666666666 * Float64(b / 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 <= 2.2e-304) tmp = -0.6666666666666666 * (b / a); else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 2.2e-304], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.2 \cdot 10^{-304}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c) :precision binary64 (if (<= b 1.95e-304) (/ (/ b -1.5) a) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
double tmp;
if (b <= 1.95e-304) {
tmp = (b / -1.5) / 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.95d-304) then
tmp = (b / (-1.5d0)) / 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.95e-304) {
tmp = (b / -1.5) / a;
} else {
tmp = (c * -0.5) / b;
}
return tmp;
}
def code(a, b, c): tmp = 0 if b <= 1.95e-304: tmp = (b / -1.5) / a else: tmp = (c * -0.5) / b return tmp
function code(a, b, c) tmp = 0.0 if (b <= 1.95e-304) tmp = Float64(Float64(b / -1.5) / 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.95e-304) tmp = (b / -1.5) / a; else tmp = (c * -0.5) / b; end tmp_2 = tmp; end
code[a_, b_, c_] := If[LessEqual[b, 1.95e-304], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.95 \cdot 10^{-304}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\
\end{array}
\end{array}
(FPCore (a b c) :precision binary64 (* (/ b a) -1.3333333333333333))
double code(double a, double b, double c) {
return (b / a) * -1.3333333333333333;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (b / a) * (-1.3333333333333333d0)
end function
public static double code(double a, double b, double c) {
return (b / a) * -1.3333333333333333;
}
def code(a, b, c): return (b / a) * -1.3333333333333333
function code(a, b, c) return Float64(Float64(b / a) * -1.3333333333333333) end
function tmp = code(a, b, c) tmp = (b / a) * -1.3333333333333333; end
code[a_, b_, c_] := N[(N[(b / a), $MachinePrecision] * -1.3333333333333333), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{a} \cdot -1.3333333333333333
\end{array}
(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}
(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}
herbie shell --seed 2024003
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))