How to find One's complement of floating point variable ?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
kintali narendra
le 5 Fév 2021
Commenté : Walter Roberson
le 8 Fév 2021
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 commentaires
James Tursa
le 5 Fév 2021
What does a 1's complement of a floating point bit pattern even mean to you? How do you intend to use this result?
Réponse acceptée
Walter Roberson
le 5 Fév 2021
typecast to uint64, take the one's complement, typecast back.
Caution: 1's complement of 0.0 is NaN.
9 commentaires
Walter Roberson
le 8 Fév 2021
@Paul note in particular they wanted the one's complement of the binary representation of double precision numbers, not of an integer data type.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!