de2bi not working for large decimal number

5 次查看(过去 30 天)
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