Precision of `Double's in Hugs

Mark P Jones
Mon, 14 Jan 2002 00:39:48 -0800

Hi Dave,

| Note that I'd recommend getting some clarification about this from either
| the current hugs team or Mark Jones (who are probably reading this list),
| as I can vaguely recall a couple of times over the last few years where
| Mark Jone has said `Hugs should not be used for serious numerical work'
| without saying whether this is fixed just by that #define.

There are two issues.  First, Gofer (from which Hugs was later
derived) was not written with numerical work in mind: I am wise
enough to know that great care must be taken in numerical work
to obtain accurate results, but I was not (nor am I still) wise
enough to know exactly what is required.  Frankly, numerical
computation was never a priority in the development of Gofer;
fitting it onto an old 8086 seemed challenge enough.  Second,
Hugs uses single precision by default because the implementation
using double precision relies on a hack whose behavior is not
assured in any way by the C language in which it is implemented.
It does work just fine on many machines, but I would be wary
about depending on it, and hence I wouldn't encourage its use
as the default.

Hope this helps!

All the best,