woods@hao.UUCP (Greg Woods) (11/29/83)
The "new math" library (for f77(1)) that we got on our 4.1aBSD distribution tape (for a VAX 11/750, if it matters) has serious bugs in it. I am talking about the "-lnm" library, not the standard "-lm" math library. I had a program that was somehow scribbling on the data and/or code, causing a wierd subscript- out-of-range error (or memory fault, if I didn't use the -C flag when compiling) even though the variable used in the subscript reference had a reasonable value. I tore my hair out for three weeks over this, trying to track it down. Eventually, I gave up and decided to go back to the old version of the code. To my surprise, I got a floating exception. This was traced to a line in a double precision subroutine that called "dexp". In this case, it occured to me that the "more accurate" routines in -lnm might fail for certain input values near the range limits, so I relinked with -lm. Surprise! Everything worked fine. I'd been so frustrated by the new version of this program that just refused to run, I was trying absolutely any wild theory, so I said, what the hell, why not try relinking with the old math library. Another *big* surprise! It now works! AAAAARRRGH! How can they release a math library that scribbles on the code?!?!? Unless you are a masochist, DON'T USE -LNM!!!!!!!! Greg "Disgusted" Woods -- {ucbvax!hplabs | allegra!nbires | decvax!brl-bmd | harpo!seismo | ihnp4!kpno} !hao!woods