julia-lang – 为什么typeof十六进制或二进制数Uint64而十进制数
发布时间:2020-12-14 01:48:47 所属栏目:Windows 来源:网络整理
导读:julia typeof(-0b111)Uint64julia typeof(-0x7)Uint64julia typeof(-7)Int64 我发现这个结果有点令人惊讶.为什么数字的数字基数确定了签名或未签名? 看起来这是预期的行为: This behavior is based on the observation that when one uses unsigned hex li
julia> typeof(-0b111) Uint64 julia> typeof(-0x7) Uint64 julia> typeof(-7) Int64 我发现这个结果有点令人惊讶.为什么数字的数字基数确定了签名或未签名?
看起来这是预期的行为:
http://docs.julialang.org/en/latest/manual/integers-and-floating-point-numbers/#integers ……似乎有点奇怪的选择. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |