libm---log(negative)

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Mon Feb 11 07:28:49 AEST 1985


> Anyway, does anyone,
> besides me, think it would be a good idea to explicitly warn the user
> when s/he attempted to call log with a negative argument?  If so,
> have you come up with a smooth way of doing it?

Yes, on UNIX System V there is a matherr(3M) library function that
is invoked when a math library routine detects an error.  By default
it prints an appropriate warning message on stderr.  The programmer
can provide his own matherr() and do whatever he thinks is appropriate
upon occurrence of a math library error.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list