We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
inttype
floattype
uinttype
1 parent c1b2fe2 commit 659bc12Copy full SHA for 659bc12
base/float.jl
@@ -962,6 +962,17 @@ bswap(x::IEEEFloat) = bswap_int(x)
962
uinttype(::Type{Float64}) = UInt64
963
uinttype(::Type{Float32}) = UInt32
964
uinttype(::Type{Float16}) = UInt16
965
+inttype(::Type{Float64}) = Int64
966
+inttype(::Type{Float32}) = Int32
967
+inttype(::Type{Float16}) = Int16
968
+# float size of integer
969
+floattype(::Type{UInt64}) = Float64
970
+floattype(::Type{UInt32}) = Float32
971
+floattype(::Type{UInt16}) = Float16
972
+floattype(::Type{Int64}) = Float64
973
+floattype(::Type{Int32}) = Float32
974
+floattype(::Type{Int16}) = Float16
975
+
976
977
## Array operations on floating point numbers ##
978
0 commit comments