[net.micro.16k] Floating Point

davet@oakhill.UUCP (Dave Trissel) (04/05/85)

In article <6370@boring.UUCP> jack@boring.UUCP (Jack Jansen) writes:
>>     Microprocessor           FADD  FSUB  FMUL  FDIV  DADD  DSUB  DMUL  DDIV
>>NS32016/NS32081 10 MHZ        7.40  7.40  4.80  8.90  7.40  7.40  6.20 11.90

>Is this true? It *does* sound funny to me that additions and
>subtractions take longer than multiplies....

Since floating-point numbers are actually a computer's form of scientific
notation, the answer is more obvious if we look at it in base 10 equivalent.

First lets multiply 3X10**2 by 5X10**5.  Just multiply the "mantissas" 3 and 5
together then add the "exponents" - 15X10**7.  But now look at addition of the
same two numbers.  We must first adjust the "mantissas" so that they align-we
can't just add 3 to 5.  Thus we convert 5X10**5 to 5000X10**2 which then
we can add to 3X10**2 to get 5003X10**2. There is even more work which may be
required (called normalization) but thats another topic.

Since the NS32081 does not have a barrel shifter (logic which shifts a large
amount of bits very quickly) the adjustments (binary shifts) can be quite
slow.  Motorola's MC68881 which does have a barrel shifter has times closer
to the relationship you expected.

>
>Can anyone enlighten me on this???
>>Weitek WTL1164,WTL1165         -     -   0.360   -     -     -   0.600   -
>>
>>The Weitek line is very bare.  The fact that an MC68020 floating point
>>coprocessor is being manufactured by Weitek is interesting, and it at least
>>promises to be very fast.  ...

Yes it is interesting.  We at Motorola hope that the MC68020 coprocessor
interface leads to many coprocessor support chips by other companies, whether
floating-point related or not.  We do not have any information concerning any
such co-processor support by Weitek, but I can make some educated guesses
about such a proposal.

First the Weitek times are fast enough that properly hooked to the '020 the
speeds would be limited by the '020's  coprocessor interface times (a little
less than a microsecond.)  Second, it is not obvious looking at Weitek's
earlier design just how the concept of registers would be implemented, and
how many.  Third, the support for transcendentals would have to be supplied
by repetitive calls (I presume) to the chip's(?) supported basic functions.

In summary, compared to the MC688881 the primary functions could optimally be
from 2 to 5 times faster at best since there is a limitation due the co-
processor interface overhead.  Square root would require at least three or
four calls to compute so it's too close to call here.  Other transcendentals
depend entirely on the software algorithms involved, although at minimum there
must be argument reduction followed by the basic calculation and then the
building of the final result.  With slick code optimizations I'm guessing that
you could still beat the MC68881 by maybe a factor of 2, but I would be
skeptical of anything better and the actual improvement could be worse.

And, of course, I would suppose the Weitek total system floating-point cost
would be much higher than the equivalent '881 unless they implement a
significant amount of interconnect support via VLSI.

Motorola Semiconductor Inc.                Dave Trissel
Austin, Texas              {ihnp4,seismo,gatech}!ut-sally!oakhill!davet