|
|
1.1 root 1: Notes on xcalc:
2:
3: I've gotten the sucker to run on an IBM RT, under BSD 4.2, and on a MicroVAX
4: GPX, under Ultrix 1.2. The RT is lucky enough to have the IEEE math routines.
5: Under these routines, if you say "x = 1.0 / 0.0", it doesn't blow up.
6: Instead, when you decide to printf() x, it shows up as "INF". The routines
7: also have the nice feature of being terribly accurate. Needless to say, this
8: all makes writing a calculator fun/E-Z.
9:
10: On the MicroVAX, however, I had to use a wretched math package, one that only
11: goes between 1E-38 and 1E+38, one that isn't very accurate, and one that will
12: cause an FP Exception at the slightest prompting. As a result, I had to put
13: in all sorts of evil nasty 'sigvec's and 'setjmp's and things. I think it
14: takes away from the intrinsic beauty (hah!) of the code, but at least it
15: doesn't say "floating exception: core dumped" anymore, so it's a step in
16: the right direction.
17:
18: The point is: If you're lucky enough to have the IEEE routines, by all means
19: add a -DIEEE to the CFLAGS line in the Makefile.
20:
21: -jhb, 3/16/86
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.