RosettaCodeData/Task/Extreme-floating-point-values/Julia/extreme-floating-point-values.jl
2024-10-16 18:07:41 -07:00

16 lines
250 B
Julia

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