Lines 14-19
Link Here
|
14 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 |
*/ |
15 |
*/ |
16 |
|
16 |
|
|
|
17 |
#include <sys/cdefs.h> |
18 |
__FBSDID("$FreeBSD$"); |
19 |
|
20 |
#include <math.h> |
21 |
|
22 |
#include "math_private.h" |
23 |
|
24 |
/* |
25 |
* Polynomial evaluator: |
26 |
* P[0] x^n + P[1] x^(n-1) + ... + P[n] |
27 |
*/ |
28 |
static inline long double |
29 |
__polevll(long double x, long double *PP, int n) |
30 |
{ |
31 |
long double y; |
32 |
long double *P; |
33 |
|
34 |
P = PP; |
35 |
y = *P++; |
36 |
do { |
37 |
y = y * x + *P++; |
38 |
} while (--n); |
39 |
|
40 |
return (y); |
41 |
} |
42 |
|
43 |
/* |
44 |
* Polynomial evaluator: |
45 |
* x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n] |
46 |
*/ |
47 |
static inline long double |
48 |
__p1evll(long double x, long double *PP, int n) |
49 |
{ |
50 |
long double y; |
51 |
long double *P; |
52 |
|
53 |
P = PP; |
54 |
n -= 1; |
55 |
y = x + *P++; |
56 |
do { |
57 |
y = y * x + *P++; |
58 |
} while (--n); |
59 |
|
60 |
return (y); |
61 |
} |
62 |
|
17 |
/* powl.c |
63 |
/* powl.c |
18 |
* |
64 |
* |
19 |
* Power function, long double precision |
65 |
* Power function, long double precision |
Lines 467-473
Link Here
|
467 |
|
513 |
|
468 |
|
514 |
|
469 |
/* Find a multiple of 1/NXT that is within 1/NXT of x. */ |
515 |
/* Find a multiple of 1/NXT that is within 1/NXT of x. */ |
470 |
static long double |
516 |
static inline long double |
471 |
reducl(long double x) |
517 |
reducl(long double x) |
472 |
{ |
518 |
{ |
473 |
long double t; |
519 |
long double t; |