Re: [PATCH] trivial, document that div64_u64() is not precise on32bit platforms

From: Ben Woodard
Date: Tue Aug 03 2010 - 20:12:59 EST


On Tue, 2010-08-03 at 15:28 -0700, Andrew Morton wrote:
> Well that was a bit lazy of us - I wonder how hard it is to fix.
> At present people will test their code on 64-bit only to find out
> later
> that it doesn't work correctly on 32-bit. Bad. Perhaps we should
> similarly break the 64-bit version :)

I just talked to Brian. He's got an implementation that does the
division correctly. He's going to clean it up and send you a patch so
that it will work without losing precision on both 32b and 64b. It is
based upon public domain code from and
has been proven to be correct in all cases.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at