Fortran vs. C for numerical work (SUMMARY)

Dik T. Winter dik at cwi.nl
Fri Nov 30 02:38:03 AEST 1990


In article <1990Nov29.040910.7400 at kithrup.COM> sef at kithrup.COM (Sean Eric Fagan) writes:
 > In article <2392:Nov2902:59:0590 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
 > >(I
 > >don't like this situation; converting to floating point just to multiply
 > >quickly on a Cray seems rather silly.)
 > 
 > Uhm... you don't have to, I don't think.  A Cyber had only one type of
 > multiply instruction, but if the exponent were 0, it did an integer
 > multiplication.  I believe Cray's do the same thing.
 > 
No.  The Cybers give indeed the lower half of the product of two integers
(and the other multiply instruction gives the upper part, although that is
not documented).  The Cray returns the upper part if the two exponents are
zero.  But the Cray has a 24x24->24 bit integer multiply and as a compiler
option you can use 24 bit integers.
--
dik t. winter, cwi, amsterdam, nederland
dik at cwi.nl



More information about the Comp.lang.c mailing list