home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / xlpoly.c < prev    next >
C/C++ Source or Header  |  1998-06-16  |  465b  |  24 lines

  1. /* _LPoly function */
  2. #include "wctype.h"
  3. #include "xmath.h"
  4. _STD_BEGIN
  5.  
  6. _CRTIMP2 long double _LPoly(long double x, const long double *tab, int n)
  7.     {    /* compute polynomial */
  8.     long double y;
  9.  
  10.     for (y = *tab; 0 <= --n; )
  11.         y = y * x + *++tab;
  12.     return (y);
  13.     }
  14. _STD_END
  15.  
  16. /*
  17.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  18.  * Consult your license regarding permissions and restrictions.
  19.  */
  20.  
  21. /*
  22. 941029 pjp: added _STD machinery
  23.  */
  24.