typemin
typemin(T)
The lowest value representable by the given (real) numeric DataType T
.
Examples
julia> typemin(Int)
-9223372036854775808
julia> typemin(Float64)
-Inf
julia> typemin(Bool)
false
-
Find the lowest value of an integer type:
julia> typemin(Int8) -128
-
Find the lowest value of a floating-point type:
julia> typemin(Float32) -Inf
- Get the lowest value of a boolean type:
julia> typemin(Bool) false
Common mistake example:
julia> typemin(String)
ERROR: TypeError: in typemin, expected Type, got String
In this example, String
is not a valid argument for typemin
since it is not a numeric data type. Make sure to provide a valid numeric data type as an argument to typemin
.
See Also
BigFloat, BigInt, Dict, eltype, fieldtype, Float32, Float64, IntSet, isa, isalnum, isalpha, isascii, iseltype, isequal, isgraph, isimmutable, isinteractive, isleaftype, isnull, ispunct, isspace, issubtype, keytype, Nullable, NullException, promote_type, typeintersect, typejoin, typemax, typemin, typeof, Val, valtype,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.