June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1,13 +1,6 @@
|
|||
function isdefinite{T<:Number}(n::T)
|
||||
!isequal(n, NaN) && abs(n) != Inf
|
||||
end
|
||||
isdefinite(n::Number) = !isnan(n) && !isinf(n)
|
||||
|
||||
for n in {1, 1//1, 1.0, 1im, 0}
|
||||
d = n/0
|
||||
print("Divding ", n, " by 0 ")
|
||||
if isdefinite(d)
|
||||
println("results in ", d, ".")
|
||||
else
|
||||
println("yields an indefinite value (", d, ").")
|
||||
end
|
||||
for n in (1, 1//1, 1.0, 1im, 0)
|
||||
d = n / 0
|
||||
println("Dividing $n by 0 ", isdefinite(d) ? "results in $d." : "yields an indefinite value ($d).")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue