Smallest positive number in MATLAB
164 次查看(过去 30 天)
显示 更早的评论
I recently stumbled upon a question on Cody (#1874), which asked the user to input the smallest in MATLAB.
As per my knowledge, realmin was supposed to return the smallest number in MATLAB, however that number is the smallest normalized floating point number. According to this thread of Stack overflow, it says eps(0) returns the smallest denormal number available in MATLAB.
However, my question is how eps(0) is denormal?
> realmin returns 2.2251e-308, where as eps(0) returns 4.9407e-324
0 个评论
采纳的回答
Stephen23
2021-4-27
编辑:Stephen23
2021-4-27
eps(0) returns the smallest positive non-zero floating point number, which is denormal:
format hex
eps(0)
Normal and denormal floating point numbers are explained here:
From the main architect of IEEE 754 (the term "gradual underflow" refers to denormal numbers):
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!