(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 -3.1e+95)
(* (/ b (* a -3.0)) 2.0)
(if (<= b 2.9e-131)
(/ (/ (- b (sqrt (- (* b b) (* (* a 3.0) c)))) -3.0) a)
(/ (* c -0.5) b))))
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
↓
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.1d+95)) then
tmp = (b / (a * (-3.0d0))) * 2.0d0
else if (b <= 2.9d-131) then
tmp = ((b - sqrt(((b * b) - ((a * 3.0d0) * c)))) / (-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) {
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 <= -3.1e+95) {
tmp = (b / (a * -3.0)) * 2.0;
} else if (b <= 2.9e-131) {
tmp = ((b - Math.sqrt(((b * b) - ((a * 3.0) * c)))) / -3.0) / a;
} else {
tmp = (c * -0.5) / b;
}
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 <= -3.1e+95:
tmp = (b / (a * -3.0)) * 2.0
elif b <= 2.9e-131:
tmp = ((b - math.sqrt(((b * b) - ((a * 3.0) * c)))) / -3.0) / a
else:
tmp = (c * -0.5) / b
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 <= -3.1e+95)
tmp = Float64(Float64(b / Float64(a * -3.0)) * 2.0);
elseif (b <= 2.9e-131)
tmp = Float64(Float64(Float64(b - sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c)))) / -3.0) / a);
else
tmp = Float64(Float64(c * -0.5) / b);
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 <= -3.1e+95)
tmp = (b / (a * -3.0)) * 2.0;
elseif (b <= 2.9e-131)
tmp = ((b - sqrt(((b * b) - ((a * 3.0) * c)))) / -3.0) / a;
else
tmp = (c * -0.5) / b;
end
tmp_2 = tmp;
end