home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / MATHSRC.ZIP / POW10L.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.4 KB  |  47 lines

  1. /*------------------------------------------------------------------------
  2.  * filename - pow10l.c
  3.  *
  4.  * function(s)
  5.  *        pow10l - long double power function, 10^p
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 5.0
  10.  *
  11.  *      Copyright (c) 1987, 1992 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16. #include <_math.h>
  17. #include <math.h>
  18.  
  19. /*--------------------------------------------------------------------------*
  20.  
  21. Name            pow10l - long double power function, 10^p
  22.  
  23. Usage           long double  pow10l(int  p);
  24.  
  25. Prototype in    math.h
  26.  
  27. Description     Calculate 10  raised to power.  A lookup table  is used for
  28.                 values  from  10  through  10^7,  then this is augmented by
  29.                 multiplying with  table entries for  10^8/16/32/64/128/256,
  30.                 512/1024/2048/4096 which allows any power up to the
  31.                 implementation limit of 4932.
  32.  
  33.                 Negative powers are provided by a final division.
  34.  
  35.                 All registers  are preserved except   AX.  This  is done to
  36.                 enable  use by  xcvt(), which  was designed  to assume  its
  37.                 registers will be undisturbed.
  38.  
  39. Return value    pow10l returns 10^p.
  40.  
  41. *---------------------------------------------------------------------------*/
  42.  
  43. long double _FARFUNC pow10l  (int  p)
  44. {
  45.     return (__pow10(p));
  46. }
  47.