Boost logo

Boost :

From: Hervé Brönnimann (hervebronnimann_at_[hidden])
Date: 2008-06-04 01:12:18


Paul: Most valuable indeed. Like a bullion of gold, because in
practice they aren't much slower than the run-of-the-mill sscanf/
sprintf (a few extra cycles, except once in a while in spurious
boundary cases where you need more than one or two extra binary
digits). But the guaranteed round-trip, and extra precision, is well
worth it. But who's got the time... <insert here great
proselytization about boost, library code, reuse, etc.> :)

Oh, I remember fondly implementing Bellerophon in grad school
(Clinger's original scanf). We had two weeks in Dave Hanson's
systems programming class, 40% of the grade for the code working on
the given examples, 40% for working on his test suite -- which he
*didn't* give us access to, and 20% for the style/doc. In 13 weeks,
we worked 13 problems (two weeks each, one week to research/read and
discuss during the next class, overlapping with implementing the
previous project). Projects ranged from various SIGPLAN/research
recent or classical articles illustrating systems issues, e.g. this
(floating point), impl. a context switcher for Solaris threads in
assembler, impl. a symbolic tree manip for optimization (Dave gave us
his lcc compiler, we only tweaked the optimizing module), some new/
improved graph algorithm for manipulating symbols in a linker's
symbol table, a couple of hard optimization problems (with
heuristics), incl. some speach audio data analysis, etc. You get the
idea.

Dave's class was the best programming class I ever took, and one I
hope to teach again myself someday. If any teacher/instructor is
listening, this is a formula I most highly recommend. Keeps everyone
honest, and teaches discipline like nothing else. (Lots of work for
the teacher though; Dave had set up a black-box server wherein we
could test our program, and output had to be *identical*, a la ACM
Competition; grading was automatic by running private test suite and
diff'ing the outputs.)

I got Bellerophon to work all right, it isn't that hard if you follow
the math (not a small feat, though), but it requires meticulous
implementation skills (and will beat it into you if you don't have
it). Then begins the fun with infinities and nans... and for
dessert: subnormal numbers.

Either one (both?) would be a great SoC project, by the way, if any
student is listening, once you have the right interface.

--
Hervé Brönnimann
hervebronnimann_at_[hidden]
On Jun 3, 2008, at 10:59 AM, Paul A Bristow wrote:
>
> I've glanced at the Burger and Dybvig algorithms you quote, but  
> they don't seem too simple to implement.  If any one can get they to
> work, they would be most valuable.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk