Why does rem(a, b) function give different answers for input values' class 'double' and 'uint64'?
Afficher commentaires plus anciens
I define two values as double,
a1 = 9419588158802421600; b1 = 44;
I am trying to use built-in remainder function,
v1 = rem (a1,b1)
output>> v1 = 28
Now, I define the same values but as uint64
a2 = uint64(9419588158802421600); b2 = uint64(44);
and use remainder function
v2 = rem (a2,b2)
output>> v2 = (uint64) 0
Why two different answers are obtained for the same input values?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!