Comparison: when operator<() is better than opCmp()

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Mon Sep 10 05:09:34 PDT 2007


On Monday 10 September 2007 13:30, Jay Norwood wrote:

> One additional thing I'd be interested in seeing is support for
> fixed point arithmetic with N bit, since the dsp applications
> which I simulate are done on fixed point processors.  It would
> be nice to have a general purpose evaluator that would handle
> the dsp fixed point expressions accurately, with hooks for
> handling overflow and rounding modes.

There are some excellent fixed-point math algorithms in Donald E.
Knuth's "MetaFont" program. I'm sure they can be readily ported to
D, even though some of the tricks to prevent overflows are based
on the specifics of the MetaFont programming language.

-- 
Giuseppe "Oblomov" Bilotta



More information about the Digitalmars-d mailing list