Path: utzoo!attcan!uunet!samsung!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!ucsd!rutgers!njin!uupsi!sunic!news.funet.fi!funic!santra!sauna.hut.fi!ado From: ado@sauna.hut.fi (Andre Dolenc) Newsgroups: comp.lang.c Subject: # to the n-th power Message-ID: <1990Nov5.135212.1700@santra.uucp> Date: 5 Nov 90 13:52:12 GMT Sender: news@santra.uucp (Cnews - USENET news system) Organization: Helsinki University of Technology, Finland Lines: 25 (1) Since my last posting I have learned that the source code to the math functions (libm) of 4.3 BSD are publicly available and may be obtained by anon. ftp from several sites, eg. funic.funet.fi in ~ft/pub/unix/bsd-sources/src/usr.lib/libm which is a copy of an anon. ftp directory in uunet.uu.net. Read the copyright notice before using them. (2) Looking into "pow" one learns that to figure out if "y" in "pow(x,y)" is an integer is reduced to: t=drem(x,two); if ((t == zero) || (copysign(t,one) == one)) then "y is int". Now, the code which implements "drem" is not trivial. Therefore, I withdraw my question "How do we decide if y is an integer?". (3) My previous posting contains (at least) one error. The multiple precision function "pow" is defined under SunOs in "misc. lib functions", MP(3X), *not* under Ultrix. The problem is that the name obviously conflicts with the math function "double pow(double x, double y)". Isn't dum to have 2 (system) library functions with the same name? In the hope of not having wasted too much bandwidth, ---------------------------------------------------------------------------- Andre' Dolenc Helsinki University of Technology Research Associate TKO, Otakaari 1A, Espoo Email (Internet): ado@sauna.hut.fi SF-02150 Finland ----------------------------------------------------------------------------