How to find One's complement of floating point variable ?
6 次查看(过去 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 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!