MATLAB问题求助! 请问MATLAB中的exp函数的结果最大应该是多少?例如:exp(709)=8.218407461554972e+307,而exp(710)=Inf.怎样设置才能使exp(710)的结果不是inf呢?谢谢!

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/19 14:55:34
MATLAB问题求助! 请问MATLAB中的exp函数的结果最大应该是多少?例如:exp(709)=8.218407461554972e+307,而exp(710)=Inf.怎样设置才能使exp(710)的结果不是inf呢?谢谢!

MATLAB问题求助! 请问MATLAB中的exp函数的结果最大应该是多少?例如:exp(709)=8.218407461554972e+307,而exp(710)=Inf.怎样设置才能使exp(710)的结果不是inf呢?谢谢!
MATLAB问题求助! 请问MATLAB中的exp函数的结果最大应该是多少?
例如:exp(709)=8.218407461554972e+307,而exp(710)=Inf.怎样设置才能使exp(710)的结果不是inf呢?谢谢!

MATLAB问题求助! 请问MATLAB中的exp函数的结果最大应该是多少?例如:exp(709)=8.218407461554972e+307,而exp(710)=Inf.怎样设置才能使exp(710)的结果不是inf呢?谢谢!
每个计算机都有计算的上限,可通过realmax命令查找你所用计算机的浮点运算上限,超过此限即显示INF,就我所知无法更改,除非更换更强大的计算机.
本机所有运算包括exp最大结果为
realmax
ans =
1.797693134862316e+308
log(realmax)
ans =
7.097827128933840e+002
说明做exp运算,自变量最大取到709.7
realmax Largest positive floating-point number Syntaxn = realmax
Descriptionn = realmax returns the largest floating-point number representable on your computer. Anything larger overflows. realmax('double') is the same as realmax with no arguments. realmax('single') is the largest single precision floating point number representable on your computer. Anything larger overflows to single(Inf). Examplesrealmax is one bit less than 21024 or about 1.7977e+308.