필터 지우기
필터 지우기

realmax is really real max, but is realmin really real min?

조회 수: 8 (최근 30일)
the cyclist
the cyclist 2015년 11월 2일
댓글: the cyclist 2015년 11월 2일
The following is expected behavior for realmax:
>> realmax
ans =
1.797693134862316e+308
>> realmax*2
ans =
Inf
But the following is unexpected behavior for realmin (at least for me):
>> realmin
ans =
2.225073858507201e-308
>> realmin/2
ans =
1.112536929253601e-308
I keep getting representable numbers until I divide realmin by 2^53. Am I missing a subtlety in what "realmin" means?

채택된 답변

Mike Garrity
Mike Garrity 2015년 11월 2일
I think that you're seeing the denorms. They allow you to get closer to 0, but at the cost of a significant dropoff in precision and performance.
  댓글 수: 1
the cyclist
the cyclist 2015년 11월 2일
Ah. Today I learned about subnormal numbers, and gradual underflow. Very interesting. Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by