home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / JPLC2.ZIP / LOG2.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-22  |  581 b   |  21 lines

  1. /* 1.0  11-13-84 */
  2. /************************************************************************
  3.  *            Robert C. Tausworthe                *
  4.  *            Jet Propulsion Laboratory            *
  5.  *            Pasadena, CA 91009        1984        *
  6.  ************************************************************************/
  7.  
  8. #include "mathcons.h"
  9.  
  10. /************************************************************************/
  11.     double
  12. log2(x)            /* return binary logarithm (base 2) of x.    */
  13.  
  14. /*----------------------------------------------------------------------*/
  15. double x;
  16. {
  17.     double log();
  18.  
  19.     return log(x) * LOG2e;
  20. }
  21.