double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = x - (1.0 / x);
} else if (exp(z) <= 1.0) {
tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
} else {
tmp = (0.8862269254527579 * (y / exp(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 = x + (y / ((1.1283791670955126d0 * exp(z)) - (x * y)))
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 (exp(z) <= 0.0d0) then
tmp = x - (1.0d0 / x)
else if (exp(z) <= 1.0d0) then
tmp = x + (y / ((1.1283791670955126d0 + (z * 1.1283791670955126d0)) - (x * y)))
else
tmp = (0.8862269254527579d0 * (y / exp(z))) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
↓
public static double code(double x, double y, double z) {
double tmp;
if (Math.exp(z) <= 0.0) {
tmp = x - (1.0 / x);
} else if (Math.exp(z) <= 1.0) {
tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
} else {
tmp = (0.8862269254527579 * (y / Math.exp(z))) + x;
}
return tmp;
}
def code(x, y, z):
return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
↓
def code(x, y, z):
tmp = 0
if math.exp(z) <= 0.0:
tmp = x - (1.0 / x)
elif math.exp(z) <= 1.0:
tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)))
else:
tmp = (0.8862269254527579 * (y / math.exp(z))) + x
return tmp
function code(x, y, z)
return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y))))
end