maxintfloat
maxintfloat(T)
The largest integer losslessly representable by the given floating-point DataType T
.
Examples
julia> maxintfloat(Float64)
9223372036854775807
julia> maxintfloat(Float32)
2147483647
julia> maxintfloat(Int64)
9223372036854775807
The maxintfloat
function returns the largest integer that can be losslessly represented by the given floating-point data type T
. Here are some common examples of its use:
-
Find the largest representable integer in Float64:
julia> maxintfloat(Float64) 9223372036854775807
-
Get the maximum integer for Float32:
julia> maxintfloat(Float32) 2147483647
- Find the largest integer representable in Int64:
julia> maxintfloat(Int64) 9223372036854775807
Note: The value of maxintfloat
depends on the floating-point data type used.
See Also
cmp, float, get_bigfloat_precision, get_rounding, get_zero_subnormals, isapprox, maxintfloat, mod2pi, nextfloat, precision, prevfloat, rationalize, round, set_bigfloat_precision, set_rounding, set_zero_subnormals, significand, with_bigfloat_precision, with_rounding,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.