[comp.lang.c] Inherent imprecision of floating point variablesREAD/NEW

leo@ehviea.ine.philips.nl (Leo de Wit) (06/28/90)

In article <1990Jun26.052624.16953@cs.umn.edu> thornley@cs.umn.edu (David H. Thornley) writes:
|In article <3806@memqa.uucp> r91400@memqa.uucp (Michael C. Grant) writes:
   [stuff left out]
|                                                        I remember a
|>VAX FORTRAN that provided a quad-precision floating point variable
|>(which even on a fully-loaded system was faster than my Z80's single
|>precision implementation)!
|
|Ah yes, the Z80.  I remember trying to write efficient arithmetic routines
|for it.  Rather difficult for a machine whose most sophisticated arithmetic
|instruction is a 16-bit add with carry!

But the Z80 had BCD; you could even rotate nibbles through A and (HL)
(a 3 nibble rotate, something like RRD and RLD if I remember
correctly).

B.T.W. I think whether you can write efficient arithmetic routines has
little to do with the sophistication of arithmetic instructions. Remember
that sometimes fancy CISC instructions are speed up by writing them out in
more basic ones; also think of the RISC philosophy.

For sentimental ones, I redirected follow-ups to comp.arch.

    Leo.