#include "mymath.h"

extern float log1pf(float x);

float
alog1p(float x)
{
#if 0
    double d;
    d = (double)x;
    return ((float)log1p(d));
#else
    return (log1pf(x));
#endif
}

#define LOG10E		0.43429448190325182765112891891660508229439700580366e+00F

/* Represent LOG10E as C7BY16 (exactly representable) + LOG10E_C7BY16 (small correction) */
#define C7BY16		0.4375e+00F
#define LOG10E_C7BY16	-3.20551809674817234887108108339491770560299419633343388554621683414e-03F

float
al1p10(float x)
{
    float y;

    y = alog1p(x);

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

}
