Error in bin2dec ?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
I am trying to convert this decimal number to binary: 297237575406453000
I am using bin2dec(297237575406453000) and I get 10000100000000000000000000000000000000000000000000100000000
However, the answer seems to be wrong, if I do it in the windows calculator the result is 010000100000000000000000000000000000000000000000000100001000 and I verified in python and the conversion is the same as windows calculator
Is it an error in the function? or am I doing something wrong?
댓글 수: 0
답변 (1개)
Stephan
2020년 6월 10일
"...If the input argument D has a value greater than the value returned by flintmax, then dec2bin might not return an exact representation."
>> flintmax < 297237575406453000
ans =
logical
1
댓글 수: 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!