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)) + (0.5d0 * ((y * x) / z))
if (z <= (-200.0d0)) then
tmp = t_0
else if (z <= 1.6d-49) then
tmp = (0.5d0 * ((y * (exp(x) + exp(-x))) / 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)) + (0.5 * ((y * x) / z));
double tmp;
if (z <= -200.0) {
tmp = t_0;
} else if (z <= 1.6e-49) {
tmp = (0.5 * ((y * (Math.exp(x) + Math.exp(-x))) / 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)) + (0.5 * ((y * x) / z))
tmp = 0
if z <= -200.0:
tmp = t_0
elif z <= 1.6e-49:
tmp = (0.5 * ((y * (math.exp(x) + math.exp(-x))) / 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(Float64(y / Float64(z * x)) + Float64(0.5 * Float64(Float64(y * x) / z)))
tmp = 0.0
if (z <= -200.0)
tmp = t_0;
elseif (z <= 1.6e-49)
tmp = Float64(Float64(0.5 * Float64(Float64(y * Float64(exp(x) + exp(Float64(-x)))) / 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)) + (0.5 * ((y * x) / z));
tmp = 0.0;
if (z <= -200.0)
tmp = t_0;
elseif (z <= 1.6e-49)
tmp = (0.5 * ((y * (exp(x) + exp(-x))) / x)) / z;
else
tmp = t_0;
end
tmp_2 = tmp;
end