目录
最大的正浮点数
语法
f = realmax
f = realmax(precision)
说明
示例
双精度
将输出格式设置为长科学记数法。返回 IEEE® 双精度形式的最大有限浮点数。
format long e
f = realmax
f =
1.797693134862316e+308
单精度
返回 IEEE® 单精度形式的最大有限浮点数。
f = realmax('single')
f = single
3.4028e+38
检查 f 的类。
class(f)
ans =
'single'
浮点精度类型,指定为'double'或 'single'。