[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [f-cpu] Re: Floating-Point?




> Ah, I have the same opinion about this theme. You don't really
> need a higher precision than 64 bit. Maybe that will change for
> galaxy navigation in the future but until now 32 bit are good
> (and fast) for most cases.

Actually, floating-point is too imprecise for ANY precision calculation.
There are lots of numbers that can't be encoded into floating-point values.

The bits in the mantissa are encoded as follows, for example:
- bit 0: 1/2: 0.5
- bit 1: 1/4: 0.25
- bit 2: 1/8: 0.125
- bit 3: 1/16: 0.0625

and so on. By setting the bits, you're adding up the fractions.

So, for example with financial computing, floating-point is a big no-no,
otherwise you end up with respresentation and rounding errors.

Any precision computing does not use floating-point. BCD string arithmetic
(as known from COBOL and FORTRAN) is most commonly used for these
tasks.

So, it doesn't really matter how precise the FP is, but the finer the
better,
of course. It would extend the number of applications for the CPU, since
sometimes it's desirable to sacrifice the precision for the sake of speed.

On mainframes, there are AFAIK some applications that use custom code
to do as much arithmetic in integer or FP as possible, and that use
fixed-point
or BCD otherwise.

32, 64 and 80 bit floating-point are standard nowadays, so these should be
supported to avoid software emulation (preferrably IEEE standard
compliant).



*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/