I agree that numlib has many problems and is in need of serious overhaul.
I have decided to use it in TAChart since it is already bundled with FPC,
so I thought that, even if imperfect, it is still better than importing yet another library.
I'd like to see numlib improved, but have no time to do that now.
As a rough plan, first I'd recommend to get rid of archaic manual memory allocation,
and use dynamic arrays everywhere. This will allow you to use range checks.
Second, I would work on the naming. I am not sure how much code is using numlib now, but I guess very little. So I'd recommend mass-renaming of units and procedures to a get away from 1960-era FORTRAN standard.
Third, the code should be brought to a consistent styling.
After that, the real work may begin on improving and fixing the code.
If you modify numlib, note that TAChart includes a modified copy to cater for
Lazarus/FPC version mismatch. I plan to synchronize copies after each FPC release.
So you'll have to send your changes both to FPC devels and me, sorry for the inconvenience.