(FPCore (a b c)
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
↓
(FPCore (a b c)
:precision binary64
(if (<= b -5.5e+132)
(+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
(if (<= b 5.3e-70)
(/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
(* (/ c b) -0.5))))
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 tmp;
if (b <= -5.5e+132) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else if (b <= 5.3e-70) {
tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
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) :: tmp
if (b <= (-5.5d+132)) then
tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
else if (b <= 5.3d-70) then
tmp = (sqrt(((b * b) - (c * (a * 3.0d0)))) - b) / (a * 3.0d0)
else
tmp = (c / b) * (-0.5d0)
end if
code = tmp
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 tmp;
if (b <= -5.5e+132) {
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
} else if (b <= 5.3e-70) {
tmp = (Math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
} else {
tmp = (c / b) * -0.5;
}
return tmp;
}
def code(a, b, c):
return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
↓
def code(a, b, c):
tmp = 0
if b <= -5.5e+132:
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
elif b <= 5.3e-70:
tmp = (math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)
else:
tmp = (c / b) * -0.5
return tmp
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)
tmp = 0.0
if (b <= -5.5e+132)
tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
elseif (b <= 5.3e-70)
tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0));
else
tmp = Float64(Float64(c / b) * -0.5);
end
return tmp
end
function tmp = code(a, b, c)
tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
↓
function tmp_2 = code(a, b, c)
tmp = 0.0;
if (b <= -5.5e+132)
tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
elseif (b <= 5.3e-70)
tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
else
tmp = (c / b) * -0.5;
end
tmp_2 = tmp;
end