cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> #include <paircw.h> extern void pconf (float_pair result, int n, const float table[], const float scale); extern void pcon (double_pair result, int n, const double table[], const double scale); extern void pconl (long_double_pair result, int n, const long double table[], const long double scale); extern void pconw (__float80_pair result, int n, const __float80 table[], const __float80 scale); extern void pconq (__float128_pair result, int n, const __float128 table[], const __float128 scale); extern void pconll (long_long_double_pair result, int n, const long_long_double table[], const long_long_double scale); extern void pcondf (decimal_float_pair result, int n, const decimal_float table[], const decimal_float scale); extern void pcond (decimal_double_pair result, int n, const decimal_double table[], const decimal_double scale); extern void pcondl (decimal_long_double result, int n, const decimal_long_double table[], const decimal_long_double scale); extern void pcondll (decimal_long_long_double result, const decimal_long_long_double x, int n, const decimal_long_double table[], const decimal_long_double scale);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
result = sum(k = 0:(n-1)) table[k] * scale**k.The summation is carried out in pair-precision arithmetic.
This function makes it possible to derive accurate pair-precision constants for a wide range of precisions from a single table of exact entries.
The recommended value of scale is 2**(-24) for binary arithmetic, and 10**(-7) for decimal arithmetic, since the table entries can then be represented exactly on a wide range of current and historical systems. It is essential that the scale value be exactly representable.