Re: 64 bit divide/mod in 2.4.0-test5

Jamie Lokier (lk@tantalophile.demon.co.uk)
Sun, 6 Aug 2000 01:02:51 +0200


Linus Torvalds wrote:
> The do_div() interface is not exactly pretty, but it was designed for
> performance and printk() in mind. In particular, it was designed so that
> it would return _both_ the remainder and the quotient, as printk() needs
> both (the remainder for the actual number, and the quotient for the next
> time through the loop).

You're aware of the algorithm for printing digits that doesn't use
any divisions, and decided not to use it, right?

;-)
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/