#include <math.h>

#if defined(__sun)
#include <sunmath.h>
#endif

extern long double log1pl (long double x);

long double
qlog1p(long double x)
{
#if 0
    double d;
    d = (double)x;
    return ((long double)log1p(d));
#else
    return (log1pl(x));
#endif
}

#define LOG10E		0.43429448190325182765112891891660508229439700580366e+00L

/* Represent LOG10E as C7BY16 (exactly representable) + LOG10E_C7BY16 (small correction) */
#define C7BY16		0.4375e+00L
#define LOG10E_C7BY16	-3.20551809674817234887108108339491770560299419633343388554621683414e-03L
long double
ql1p10(long double x)
{
    long double y;

    y = qlog1p(x);

#if 0
    return ((y * C7BY16) + (y * LOG10E_C7BY16));
#else
    return (y * LOG10E);
#endif

}
