필터 지우기
필터 지우기

BUG in dec2hex

조회 수: 2 (최근 30일)
XX
XX 2023년 9월 4일
편집: Stephen23 2023년 9월 4일
  댓글 수: 1
Stephen23
Stephen23 2023년 9월 4일
편집: Stephen23 2023년 9월 4일
You do not explain what the problem is.
Note that your last example uses DOUBLE class and not UINT64, which clearly has a different bit pattern:
u = bitxor(uint64(0xFF000000),0xFFFFFFFFFFFFFFFF)
u = uint64 18446744069431361535
dec2hex(u)
ans = 'FFFFFFFF00FFFFFF'
d = double(u) % The same value you entered by hand
d = 1.8447e+19
dec2hex(d)
ans = 'FFFFFFFF01000000'

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by