How can I find the remainder with floating point numbers?

前端 未结 0 354
野的像风
野的像风 2021-01-06 01:03
long long convert(float n) {
    long long result = 0;
    float rem, i = 1, step = 1,c = 2.0;
    while (n != 0) {
        rem = fmod(n,c);
        n /= 2;
                 


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题