local string = io.read()
local z = tonumber(string)
function sigmoid(x, magnitude)
if not x or not magnitude then
x = 1
magnitude = 1
end
return (1 / (1 + math.exp(-x * magnitude)))
end
--print(sigmoid(z, 2))
for i = -20, 20, .5 do
print(sigmoid(i, 1))
end
To embed this project on your website, copy the following code and paste it into your website's HTML: