Sender: nate AT cartsys DOT com Message-ID: <37603171.97E09047@cartsys.com> Date: Thu, 10 Jun 1999 14:43:13 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586) MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: libm sources from cyberoptics References: <37600018 DOT F31667EB AT cyberoptics DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eric Rudd wrote: > > Eli Zaretskii wrote: > > > On Wed, 9 Jun 1999, Martin Stromberg wrote: > > > > > _If_ lim(x^0) = 1, then I would say 0^0 should be defined as 1, > > > x->0- > > > > Perhaps it would be a good idea to see what other libraries do in that > > case. > > Borland C++ v3.1: pow(0,0) = 1, domain error > Watcom C++ v10.0: pow(0,0) = 1, domain error, "argument too large" [?] > Microsoft C++: pow(0,0) = 1, no error return > Linux gcc: pow(0,0) = 1, no error return > hp 15C calculator: Error 0 > Matlab: 0^0 = 1, no error return > Formal mathematics: limit is undefined > > -Eric Rudd IRIX 5.3 (cc): pow(0,0) = 1.000000, errno = 0 (Error 0) [i.e. no error] SunOS 5.6 (gcc): pow(0,0) = 1.000000, errno = 0 (Error 0) HP 48G calculator: 1 Sharp EL-531L calculator: Error 2 HP 32S calculator: "Invalid y^x" IMHO, we should define 0^0 = 1 since that's what the ANSI amendment or whatever it was says. It seems likely to be approved. Furthermore, I don't feel that ANSI is totally off the wall on this (unlike, perhaps, their views on trigraphs). There certainly seems to be some mathematical justification and support for 0^0=1, as for instance in the FAQ I mentioned. -- Nate Eldredge nate AT cartsys DOT com