How to find One's complement of floating point variable ?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I used Simulink Bitwise Not operator to find the one's complement of uint8 type variable.
Now I want to find one's complement of float variable (double) using simulink.
Can you please help me on how to perform the task.
Thank you
댓글 수: 2
James Tursa
2021년 2월 5일
What does a 1's complement of a floating point bit pattern even mean to you? How do you intend to use this result?
채택된 답변
Walter Roberson
2021년 2월 5일
typecast to uint64, take the one's complement, typecast back.
Caution: 1's complement of 0.0 is NaN.
댓글 수: 9
Walter Roberson
2021년 2월 8일
@Paul note in particular they wanted the one's complement of the binary representation of double precision numbers, not of an integer data type.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!