RosettaCodeData/Task/Extreme-floating-point-values/Julia/extreme-floating-point-values.julia
2017-09-25 22:28:19 +02:00

16 lines
250 B
Text

function showextremes()
values = [0.0, -0.0, Inf, -Inf, NaN]
println(1 ./ values)
end
showextremes()
@show Inf + 2.0
@show Inf + Inf
@show Inf - Inf
@show Inf * Inf
@show Inf / Inf
@show Inf * 0
@show 0 == -0
@show NaN == NaN
@show NaN === NaN