PCON 3CW "11 July 2007" "mathcw-1.00"

Table of contents


NAME

pconf, pcon, pconl, pconw, pconq, pconll, pcondf, pcond, pcondl, pcondll - pair-precision constant reconstruction

SYNOPSIS

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.


DESCRIPTION

Given a table of n entries, reconstruct an accurate pair-precision constant from the relation
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.


RETURN VALUES

None. The function result is stored in the first argument, result.

ERRORS

None.

SEE ALSO

pabs(3CW), pacos(3CW), pacosh(3CW), padd(3CW), pasin(3CW), pasinh(3CW), patan(3CW), patan2(3CW), patanh(3CW), pcbrt(3CW), pcmp(3CW), pcopy(3CW), pcopysign(3CW), pcos(3CW), pcosh(3CW), pcotan(3CW), pdiv(3CW), pdot(3CW), peps(3CW), peval(3CW), pexp(3CW), pexp10(3CW), pexp16(3CW), pexp2(3CW), pexp8(3CW), pexpm1(3CW), pfdim(3CW), pfmax(3CW), pfmin(3CW), pfrexp(3CW), pfrexph(3CW), phigh(3CW), phypot(3CW), pierf(3CW), pierfc(3CW), pilogb(3CW), pin(3CW), pinfty(3CW), pipow(3CW), pisinf(3CW), pisnan(3CW), pisqnan(3CW), pissnan(3CW), pldexp(3CW), pldexph(3CW), plog(3CW), plog101p(3CW), plog1p(3CW), plow(3CW), pmul(3CW), pmul2(3CW), pneg(3CW), pout(3CW), pprosum(3CW), pqnan(3CW), pscalbln(3CW), pscalbn(3CW), pset(3CW), psignbit(3CW), psin(3CW), psinh(3CW), psnan(3CW), psplit(3CW), psqrt(3CW), psub(3CW), psum(3CW), psum2(3CW), ptan(3CW), ptanh(3CW).