最小二乘 julia_在Julia中查找数据类型的最小值/最小值

最小二乘 julia

To find the minimum value that a data type can hold, we use the typemin() function – it accepts a data type and returns its minimum value.

为了找到数据类型可以容纳的最小值,我们使用typemin()函数-它接受数据类型并返回其最小值。

Example:

例:

# finding the minimum values of the various
# data types

print("Min value of Int8: ")
println(typemin(Int8))

print("Min value of UInt8: ")
println(typemin(UInt8))

print("Min value of Int16: ")
println(typemin(Int16))

print("Min value of UInt16: ")
println(typemin(UInt16))

print("Min value of Int32: ")
println(typemin(Int32))

print("Min value of UInt32: ")
println(typemin(UInt32))

print("Min value of Int64: ")
println(typemin(Int64))

print("Min value of UInt64: ")
println(typemin(UInt64))

print("Min value of Int128: ")
println(typemin(Int128))

print("Min value of UInt128: ")
println(typemin(UInt128))

print("Min value of Bool: ")
println(typemin(Bool))

Output

输出量

Min value of Int8: -128
Min value of UInt8: 0
Min value of Int16: -32768
Min value of UInt16: 0
Min value of Int32: -2147483648
Min value of UInt32: 0
Min value of Int64: -9223372036854775808
Min value of UInt64: 0
Min value of Int128: -170141183460469231731687303715884105728
Min value of UInt128: 0
Min value of Bool: false


翻译自: https://www.includehelp.com/julia/finding-the-minimum-smallest-value-of-a-data-type.aspx

最小二乘 julia

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值