Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site entropy.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!mhuxv!mhuxh!mhuxi!mhuxm!mhuxj!houxm!vax135!cornell!uw-beaver!uw-june!entropy!hubert From: hubert@entropy.UUCP (Steve Hubert) Newsgroups: net.bugs.4bsd Subject: libm---log(negative) Message-ID: <130@entropy.UUCP> Date: Fri, 8-Feb-85 14:04:10 EST Article-I.D.: entropy.130 Posted: Fri Feb 8 14:04:10 1985 Date-Received: Sun, 10-Feb-85 03:11:22 EST Distribution: net Organization: UW MathStat, Seattle Lines: 16 Libm says log(negative) = -HUGE and sqrt(negative) = 0. Both set errno = EDOM which is reasonable. I guess the values 0 and -HUGE must come from the idea that the functions should be continuous at zero or some voodoo like that. If I am not mistaken, Fortran programmers are used to being yelled at when they try to pass an out-of-domain argument to a function. C programmers, as always, are a different story. 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? Steve Hubert Dept. of Stat., U. of Wash, Seattle {allegra,decvax,ihnp4,ucbvax!lbl-csam}!uw-beaver!entropy!hubert hubert%entropy@uw-beaver