Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#180 Inaccurate co_div64()

v0.7.x (release)
closed-fixed
nobody
5
2010-10-20
2010-09-20
Ron Avriel
No

co_div64() is inaccurate. For example,
co_div64(0x100000000,0x10000000) returns 15 instead of 16.
co_div64(0x1000000000000,0x10000000) returns 983055 instead of 1048576.
As an alternative, I suggest using http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c that returns both the result and the remainder, both needed in time calculation. Another option is to use Windows native divide operator. Why do we need to implement it if it already exists?

Thanks,
Ron

Discussion

  • Henry N.
    Henry N.
    2010-10-20

    SVN r1530: co_div64 replaced with more accurate div64_32 from linux-2.6.33.5

     
  • Henry N.
    Henry N.
    2010-10-20

    • status: open --> closed-fixed