de2bi not working for large decimal number

조회 수: 4 (최근 30일)
MAURIZIO MURATORI
MAURIZIO MURATORI 2019년 10월 16일
편집: Stephen23 2019년 10월 16일
I have a problem with de2bi. Just typing de2bi(bi2de(ones(1,56))) I should trivially obtain ones(1,56), but I obtain a row of 56 zeros and a one. Why is that?

채택된 답변

Stephen23
Stephen23 2019년 10월 16일
편집: Stephen23 2019년 10월 16일
"Why is that?"
Because those functions use double class, and your value is well above flintmax:
>> 2^53 % flintmax
ans = 9.0072e+015
>> bi2de(ones(1,56)) % your value
ans = 7.2058e+016
See also:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Clocks and Timers에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by