"Numerical Recipes in C" is nonportable code

Rob Carriere rob at raksha.eng.ohio-state.edu
Thu Sep 1 13:48:49 AEST 1988


In article <8400 at smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <547 at accelerator.eng.ohio-state.edu> rob at kaa.eng.ohio-state.edu 
>(Rob Carriere) writes:
>>The problem is that the authors of Numerical Recipes (NR) observe,
>>correctly, that many numerical problems are naturally non-zero based.
                       ^^^^^^^^^^^^^^^^^^
>INcorrectly!  I've written a lot of array/matrix code in both
                                     ^^^^^^^^^^^^^^^^^
>Fortran and C, and have found that it normally doesn't matter
>and in those cases where it does matter, it doesn't matter much.

Trivial refutation time!  Surely it is obvious that ``numerical
problems'' forms a (large) superset of ``array/matrix code'' as far as
numerical analysis is concerned?

Believe it or not, but there are *many* algorithms out there where
it's either base-1 indexing or index arithmatic all over the place.
Not with your traditional LU-decomposition stuff and so on, but with
algorithms where the contents or properties of the matrix elements are
computed from the indeces.

Rob Carriere



More information about the Comp.lang.c mailing list