[sldev] getting serious about software.

Dirk Moerenhout blakar at gmail.com
Sat Jun 23 07:34:01 PDT 2007


> Just for the fun of it, here's my version
> (it's exactly the same behavior as the float
> version, not rounding up numbers that are already
> powers of two).

Ah yes, I took it literally (the next) and rewrote it for exercise
(not for the viewer) and never checked if it actually got called with
powers of 2 :-) Still my version returns floats so it does work beyond
2^31 even if it's not used ;-)

It did give me some ideas on how I can do the ceil and floor stuff in
C without resorting to the system calls (which are slow as you need to
change rounding method).


More information about the SLDev mailing list