next up previous

2.1 Numerical Robustness     continued...

Numeric polymorphism, plus real kind type parameterization, decimal precision selection, and numeric environmental inquiry, justify ranking Fortran 90 first among the four languages. The reason for ranking Fortran 77 second is its support for complex variables, important in many computational science applications. C++ nudges out C for third place due to its capabilities in the general area of polymorphism.

List of retrievable codes:

smooth77.f , and test_smooth77.f , Fortran 77 version of subroutine SMOOTH to compute a 3x3 average for each element of an input matrix, except for the edges of the matrix. (This is a simple version of a common technique for refining/enhancing a picture represented by a matrix.) And a Fortran 77 code to test smooth77.f.

smooth90.f, Fortran 90 version of subroutine SMOOTH.

test_smooth.c , C version of subroutine SMOOTH and test program. (C++ version would be similar, though classes would be used. if polymorphism were important as described in section 3.3).