\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\]
↓
\[\begin{array}{l}
t_0 := {\left(-1.5 \cdot \left(c \cdot a\right)\right)}^{2}\\
t_1 := \left(\left(2.25 \cdot \left(c \cdot a\right)\right) \cdot c\right) \cdot a\\
-0.16666666666666666 \cdot \frac{{\left(\frac{1}{b}\right)}^{7} \cdot \left(2.25 \cdot \left(t_0 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right) + {\left(-0.5 \cdot t_0\right)}^{2}\right)}{a} + \left(-0.25 \cdot \left(c \cdot \left(t_1 \cdot {\left(\frac{1}{b}\right)}^{5}\right)\right) + \left(-0.16666666666666666 \cdot \frac{t_1 \cdot {b}^{-3}}{a} + -0.5 \cdot \frac{c}{b}\right)\right)
\end{array}
\]
(FPCore (a b c)
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a))) ↓
(FPCore (a b c)
:precision binary64
(let* ((t_0 (pow (* -1.5 (* c a)) 2.0)) (t_1 (* (* (* 2.25 (* c a)) c) a)))
(+
(*
-0.16666666666666666
(/
(*
(pow (/ 1.0 b) 7.0)
(+ (* 2.25 (* t_0 (* (pow a 2.0) (pow c 2.0)))) (pow (* -0.5 t_0) 2.0)))
a))
(+
(* -0.25 (* c (* t_1 (pow (/ 1.0 b) 5.0))))
(+
(* -0.16666666666666666 (/ (* t_1 (pow b -3.0)) a))
(* -0.5 (/ c b))))))) double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
↓
double code(double a, double b, double c) {
double t_0 = pow((-1.5 * (c * a)), 2.0);
double t_1 = ((2.25 * (c * a)) * c) * a;
return (-0.16666666666666666 * ((pow((1.0 / b), 7.0) * ((2.25 * (t_0 * (pow(a, 2.0) * pow(c, 2.0)))) + pow((-0.5 * t_0), 2.0))) / a)) + ((-0.25 * (c * (t_1 * pow((1.0 / b), 5.0)))) + ((-0.16666666666666666 * ((t_1 * pow(b, -3.0)) / a)) + (-0.5 * (c / b))));
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
↓
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) :: t_1
t_0 = ((-1.5d0) * (c * a)) ** 2.0d0
t_1 = ((2.25d0 * (c * a)) * c) * a
code = ((-0.16666666666666666d0) * ((((1.0d0 / b) ** 7.0d0) * ((2.25d0 * (t_0 * ((a ** 2.0d0) * (c ** 2.0d0)))) + (((-0.5d0) * t_0) ** 2.0d0))) / a)) + (((-0.25d0) * (c * (t_1 * ((1.0d0 / b) ** 5.0d0)))) + (((-0.16666666666666666d0) * ((t_1 * (b ** (-3.0d0))) / a)) + ((-0.5d0) * (c / b))))
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);
}
↓
public static double code(double a, double b, double c) {
double t_0 = Math.pow((-1.5 * (c * a)), 2.0);
double t_1 = ((2.25 * (c * a)) * c) * a;
return (-0.16666666666666666 * ((Math.pow((1.0 / b), 7.0) * ((2.25 * (t_0 * (Math.pow(a, 2.0) * Math.pow(c, 2.0)))) + Math.pow((-0.5 * t_0), 2.0))) / a)) + ((-0.25 * (c * (t_1 * Math.pow((1.0 / b), 5.0)))) + ((-0.16666666666666666 * ((t_1 * Math.pow(b, -3.0)) / a)) + (-0.5 * (c / b))));
}
def code(a, b, c):
return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
↓
def code(a, b, c):
t_0 = math.pow((-1.5 * (c * a)), 2.0)
t_1 = ((2.25 * (c * a)) * c) * a
return (-0.16666666666666666 * ((math.pow((1.0 / b), 7.0) * ((2.25 * (t_0 * (math.pow(a, 2.0) * math.pow(c, 2.0)))) + math.pow((-0.5 * t_0), 2.0))) / a)) + ((-0.25 * (c * (t_1 * math.pow((1.0 / b), 5.0)))) + ((-0.16666666666666666 * ((t_1 * math.pow(b, -3.0)) / a)) + (-0.5 * (c / b))))
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 code(a, b, c)
t_0 = Float64(-1.5 * Float64(c * a)) ^ 2.0
t_1 = Float64(Float64(Float64(2.25 * Float64(c * a)) * c) * a)
return Float64(Float64(-0.16666666666666666 * Float64(Float64((Float64(1.0 / b) ^ 7.0) * Float64(Float64(2.25 * Float64(t_0 * Float64((a ^ 2.0) * (c ^ 2.0)))) + (Float64(-0.5 * t_0) ^ 2.0))) / a)) + Float64(Float64(-0.25 * Float64(c * Float64(t_1 * (Float64(1.0 / b) ^ 5.0)))) + Float64(Float64(-0.16666666666666666 * Float64(Float64(t_1 * (b ^ -3.0)) / a)) + Float64(-0.5 * Float64(c / b)))))
end
function tmp = code(a, b, c)
tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
↓
function tmp = code(a, b, c)
t_0 = (-1.5 * (c * a)) ^ 2.0;
t_1 = ((2.25 * (c * a)) * c) * a;
tmp = (-0.16666666666666666 * ((((1.0 / b) ^ 7.0) * ((2.25 * (t_0 * ((a ^ 2.0) * (c ^ 2.0)))) + ((-0.5 * t_0) ^ 2.0))) / a)) + ((-0.25 * (c * (t_1 * ((1.0 / b) ^ 5.0)))) + ((-0.16666666666666666 * ((t_1 * (b ^ -3.0)) / a)) + (-0.5 * (c / b))));
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]
↓
code[a_, b_, c_] := Block[{t$95$0 = N[Power[N[(-1.5 * N[(c * a), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.25 * N[(c * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * a), $MachinePrecision]}, N[(N[(-0.16666666666666666 * N[(N[(N[Power[N[(1.0 / b), $MachinePrecision], 7.0], $MachinePrecision] * N[(N[(2.25 * N[(t$95$0 * N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(-0.5 * t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(c * N[(t$95$1 * N[Power[N[(1.0 / b), $MachinePrecision], 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.16666666666666666 * N[(N[(t$95$1 * N[Power[b, -3.0], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
↓
\begin{array}{l}
t_0 := {\left(-1.5 \cdot \left(c \cdot a\right)\right)}^{2}\\
t_1 := \left(\left(2.25 \cdot \left(c \cdot a\right)\right) \cdot c\right) \cdot a\\
-0.16666666666666666 \cdot \frac{{\left(\frac{1}{b}\right)}^{7} \cdot \left(2.25 \cdot \left(t_0 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right) + {\left(-0.5 \cdot t_0\right)}^{2}\right)}{a} + \left(-0.25 \cdot \left(c \cdot \left(t_1 \cdot {\left(\frac{1}{b}\right)}^{5}\right)\right) + \left(-0.16666666666666666 \cdot \frac{t_1 \cdot {b}^{-3}}{a} + -0.5 \cdot \frac{c}{b}\right)\right)
\end{array}