![]() | ![]() |
![]() |
![]() |
![]() | ![]() |
Computer bugs from the 1960s and 1970sBy Jacob Palme In the 1960s and the beginning of the 1970s, I was mostly
using the Fortran programming language. Here are some stories of weird
things which happened using the IBM Fortran G and Fortran H compilers. |
|||||
Optimize a little too much? The idea with this code was that the WRITE statement would be executed only for every 100th iteration of the loop. Since I/100*100, using integer arithmetic, will only be equal to I if I is a multiple of 100. This worked all right with the normal Fortran G compiler. But when we got the new, super-duper highly optimizing Fortran H compiler, the WRITE statement started executing for every iteration in the loop, instead of every 100th! It is not too difficult to guess what the optimizing compiler did with this code! |
![]() |
2+2=6 I wrote the following FORTRAN function: FUNCTION F(I) This function was then called from another subroutine with the following call: F(2) And the value of I after this piece of code was not 4 but 6! Again, I leave it to the reader to guess what had happended. |
|||
![]() |
|||||
![]() |
|||||
![]() |