12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.5 (2025-04-14)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> x = nextfloat(Float16(+0.0))
Float16(6.0e-8)
julia> x
Float16(6.0e-8)
julia> q = Rational{BigInt}(x)
1//16777216
julia> q
1//16777216
julia> 2^24
16777216
julia> 16777216*x
Inf16
julia> x*16777216
Inf16
julia> x == 1//16777216
false
julia> x == q
true
julia> q == 1//16777216
true
julia> isequal(x,1//16777216)
false
julia> isequal(x,q)
true
julia> isequal(q,1//16777216)
true
julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, tigerlake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
julia>