[comp.lang.c] Log Library - How is it done in the library c

dave@cs.arizona.edu (Dave P. Schaumann) (03/13/91)

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!