From ae2468b7c9596231cd590552fcd0f476752034c4 Mon Sep 17 00:00:00 2001 From: Michael Abbott Date: Tue, 22 Dec 2020 02:27:07 +0100 Subject: [PATCH] inf + nan examples --- base/float.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/base/float.jl b/base/float.jl index f5da9380a1588..01d42cdd455d8 100644 --- a/base/float.jl +++ b/base/float.jl @@ -37,13 +37,16 @@ const Inf = Inf64 Positive infinity of type [`Float64`](@ref). -See also: [`isfinite`](@ref), [`NaN`](@ref), [`Inf32`](@ref). +See also: [`isfinite`](@ref), [`typemax`](@ref), [`NaN`](@ref), [`Inf32`](@ref). # Examples ```jldoctest julia> π/0 Inf +julia> +1.0 / -0.0 +-Inf + julia> ℯ^-Inf 0.0 ``` @@ -65,6 +68,9 @@ NaN julia> Inf - Inf NaN + +julia> NaN == NaN, isequal(NaN, NaN), NaN === NaN +(false, true, true) ``` """ NaN, NaN64