home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / lib / jplc2 / 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.