[net.micro.pc] MS FORTRAN integer multiplying

5114djh@hound.UUCP (D.HOUCK) (01/13/84)

I have just started running MS FORTRAN (V3.13) and decided to
check it out with a simulation program I had run on other machines.
When it didn't run correctly I traced the problem to the random
number generator that I had used.  This is the standard congruential 
method that assumes 2's complement representation of 32-bit integers 
and overflows are thrown away.  However, it appears that large integer
multiplications do not work as expected.
As a simple example, the product of 2 and 1073741824(2**30)
resulted in an answer of -131072(-2**17).
The answer normally is the number with bit representation of a one 
followed by 31 zeros. Whatever you want to call that number, it's not -2**17.
   I would like to know if anyone has experienced similar problems
or if anyone knows how integer overflows are handled in MS FORTRAN.

                            David Houck
                            AT&T Bell Laboratories