Path: utzoo!news-server.csri.toronto.edu!rutgers!news.cs.indiana.edu!arizona.edu!arizona!dave From: dave@cs.arizona.edu (Dave P. Schaumann) Newsgroups: comp.lang.c Subject: Re: Log Library - How is it done in the library c Message-ID: <1145@caslon.cs.arizona.edu> Date: 12 Mar 91 20:35:24 GMT References: <15438@smoke.brl.mil> <1991Mar12.014416.4289@m.cs.uiuc.edu> <1991Mar12.165943.11101@zoo.toronto.edu> <2063@gold.gvg.tek.com> Organization: U of Arizona CS Dept, Tucson Lines: 15 In article <2063@gold.gvg.tek.com> shaunc@gold.gvg.tek.com (Shaun Case) writes: >Just as a point of minor interest, you can get the exponent of the log >of a string representation of a positive integer by doing a strlen(). >(log base 10, of course.) > >Example: >strlen("1") -1 == 0 log == 0 >[...] >Now, if we could only use strupr() to calculate sin and cos... >:-) Actually, if you're willing to tolerate the same range of error (+/- 1), you can define sin(x) == cos(x) == 0. -- Dave Schaumann | dave@cs.arizona.edu | Short .sig's rule!