home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / MATH / CBRT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  216 b   |  12 lines

  1. /* cbrt.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
  2.  
  3. #include <math.h>
  4.  
  5. double cbrt (double x)
  6. {
  7.   if (x >= 0)
  8.     return (pow (x, 1.0 / 3.0));
  9.   else
  10.     return (-pow (-x, 1.0 / 3.0));
  11. }
  12.