⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 polevll.c

📁 128位长双精度型数字运算包
💻 C
字号:
/*							polevll.c *							p1evll.c * *	Evaluate polynomial * * * * SYNOPSIS: * * int N; * long double x, y, coef[N+1], polevl[]; * * y = polevll( x, coef, N ); * * * * DESCRIPTION: * * Evaluates polynomial of degree N: * *                     2          N * y  =  C  + C x + C x  +...+ C x *        0    1     2          N * * Coefficients are stored in reverse order: * * coef[0] = C  , ..., coef[N] = C  . *            N                   0 * *  The function p1evll() assumes that coef[N] = 1.0 and is * omitted from the array.  Its calling arguments are * otherwise the same as polevll(). * * * SPEED: * * In the interest of speed, there are no checks for out * of bounds arithmetic.  This routine is used by most of * the functions in the library.  Depending on available * equipment features, the user may wish to rewrite the * program in microcode or assembly language. * *//*Cephes Math Library Release 2.2:  July, 1992Copyright 1984, 1987, 1988, 1992 by Stephen L. MoshierDirect inquiries to 30 Frost Street, Cambridge, MA 02140*/#include "mconf.h"/* Polynomial evaluator: *  P[0] x^n  +  P[1] x^(n-1)  +  ...  +  P[n] */long double polevll( x, PP, n )long double x;void *PP;int n;{register long double y;long double *P;P = (long double *) PP;y = *P++;do	{	y = y * x + *P++;	}while( --n );return(y);}/* Polynomial evaluator: *  x^n  +  P[0] x^(n-1)  +  P[1] x^(n-2)  +  ...  +  P[n] */long double p1evll( x, PP, n )long double x;void *PP;int n;{register long double y;long double *P;P = (long double *) PP;n -= 1;y = x + *P++;do	{	y = y * x + *P++;	}while( --n );return( y );}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -