double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 4e-262) {
tmp = x + (-1.0 / x);
} else if (exp(z) <= 1.0000002) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x + (y / (exp(z) * 1.1283791670955126));
}
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) <= 4d-262) then
tmp = x + ((-1.0d0) / x)
else if (exp(z) <= 1.0000002d0) then
tmp = x + (y / (1.1283791670955126d0 - (x * y)))
else
tmp = x + (y / (exp(z) * 1.1283791670955126d0))
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) <= 4e-262) {
tmp = x + (-1.0 / x);
} else if (Math.exp(z) <= 1.0000002) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x + (y / (Math.exp(z) * 1.1283791670955126));
}
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) <= 4e-262:
tmp = x + (-1.0 / x)
elif math.exp(z) <= 1.0000002:
tmp = x + (y / (1.1283791670955126 - (x * y)))
else:
tmp = x + (y / (math.exp(z) * 1.1283791670955126))
return tmp
function code(x, y, z)
return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y))))
end
↓
function code(x, y, z)
tmp = 0.0
if (exp(z) <= 4e-262)
tmp = Float64(x + Float64(-1.0 / x));
elseif (exp(z) <= 1.0000002)
tmp = Float64(x + Float64(y / Float64(1.1283791670955126 - Float64(x * y))));
else
tmp = Float64(x + Float64(y / Float64(exp(z) * 1.1283791670955126)));
end
return tmp
end
function tmp = code(x, y, z)
tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
end
↓
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (exp(z) <= 4e-262)
tmp = x + (-1.0 / x);
elseif (exp(z) <= 1.0000002)
tmp = x + (y / (1.1283791670955126 - (x * y)));
else
tmp = x + (y / (exp(z) * 1.1283791670955126));
end
tmp_2 = tmp;
end