double code(double x, double y, double z) {
double tmp;
if (z <= -1.9e-43) {
tmp = ((cosh(x) / z) / x) * y;
} else if (z <= 8e-92) {
tmp = cosh(x) * ((y / z) / x);
} else {
tmp = cosh(x) * (y / (z * x));
}
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) :: tmp
if (z <= (-1.9d-43)) then
tmp = ((cosh(x) / z) / x) * y
else if (z <= 8d-92) then
tmp = cosh(x) * ((y / z) / x)
else
tmp = cosh(x) * (y / (z * x))
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 tmp;
if (z <= -1.9e-43) {
tmp = ((Math.cosh(x) / z) / x) * y;
} else if (z <= 8e-92) {
tmp = Math.cosh(x) * ((y / z) / x);
} else {
tmp = Math.cosh(x) * (y / (z * x));
}
return tmp;
}
def code(x, y, z):
return (math.cosh(x) * (y / x)) / z
↓
def code(x, y, z):
tmp = 0
if z <= -1.9e-43:
tmp = ((math.cosh(x) / z) / x) * y
elif z <= 8e-92:
tmp = math.cosh(x) * ((y / z) / x)
else:
tmp = math.cosh(x) * (y / (z * x))
return tmp
function code(x, y, z)
return Float64(Float64(cosh(x) * Float64(y / x)) / z)
end
↓
function code(x, y, z)
tmp = 0.0
if (z <= -1.9e-43)
tmp = Float64(Float64(Float64(cosh(x) / z) / x) * y);
elseif (z <= 8e-92)
tmp = Float64(cosh(x) * Float64(Float64(y / z) / x));
else
tmp = Float64(cosh(x) * Float64(y / Float64(z * x)));
end
return tmp
end
function tmp = code(x, y, z)
tmp = (cosh(x) * (y / x)) / z;
end
↓
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (z <= -1.9e-43)
tmp = ((cosh(x) / z) / x) * y;
elseif (z <= 8e-92)
tmp = cosh(x) * ((y / z) / x);
else
tmp = cosh(x) * (y / (z * x));
end
tmp_2 = tmp;
end