double code(double x, double y, double z) {
double t_0 = y / (z * x);
double tmp;
if (z <= -3.35e+19) {
tmp = cosh(x) * t_0;
} else if (z <= 7e+47) {
tmp = (cosh(x) * (y / x)) / z;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = y / (z * x)
if (z <= (-3.35d+19)) then
tmp = cosh(x) * t_0
else if (z <= 7d+47) then
tmp = (cosh(x) * (y / x)) / z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
↓
public static double code(double x, double y, double z) {
double t_0 = y / (z * x);
double tmp;
if (z <= -3.35e+19) {
tmp = Math.cosh(x) * t_0;
} else if (z <= 7e+47) {
tmp = (Math.cosh(x) * (y / x)) / z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z):
return (math.cosh(x) * (y / x)) / z
↓
def code(x, y, z):
t_0 = y / (z * x)
tmp = 0
if z <= -3.35e+19:
tmp = math.cosh(x) * t_0
elif z <= 7e+47:
tmp = (math.cosh(x) * (y / x)) / z
else:
tmp = t_0
return tmp
function code(x, y, z)
return Float64(Float64(cosh(x) * Float64(y / x)) / z)
end
↓
function code(x, y, z)
t_0 = Float64(y / Float64(z * x))
tmp = 0.0
if (z <= -3.35e+19)
tmp = Float64(cosh(x) * t_0);
elseif (z <= 7e+47)
tmp = Float64(Float64(cosh(x) * Float64(y / x)) / z);
else
tmp = t_0;
end
return tmp
end
function tmp = code(x, y, z)
tmp = (cosh(x) * (y / x)) / z;
end
↓
function tmp_2 = code(x, y, z)
t_0 = y / (z * x);
tmp = 0.0;
if (z <= -3.35e+19)
tmp = cosh(x) * t_0;
elseif (z <= 7e+47)
tmp = (cosh(x) * (y / x)) / z;
else
tmp = t_0;
end
tmp_2 = tmp;
end