View | Details | Raw Unified | Return to bug 115731
Collapse All | Expand All

(-)d2c/runtime/c-code/float.c (-12 / +12 lines)
Lines 101-111 Link Here
101
101
102
#define SQRTHL	0.70710678118654752440L
102
#define SQRTHL	0.70710678118654752440L
103
103
104
static long double polevll(long double, long double *, size_t);
105
static long double p1evll(long double, long double *, size_t);
106
104
long double (logl)(long double x)
107
long double (logl)(long double x)
105
{
108
{
106
  static long double polevll(long double, long double *, size_t);
107
  static long double p1evll(long double, long double *, size_t);
108
109
  /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
109
  /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
110
   * sqrt(2) Theoretical peak relative error = 2.32e-20
110
   * sqrt(2) Theoretical peak relative error = 2.32e-20
111
   */
111
   */
Lines 229-239 Link Here
229
#define LOG2EAL	4.4269504088896340735992e-1L
229
#define LOG2EAL	4.4269504088896340735992e-1L
230
#define SQRTHL	0.70710678118654752440L
230
#define SQRTHL	0.70710678118654752440L
231
231
232
long double polevll(long double, long double *, size_t);
233
long double p1evll(long double, long double *, size_t);
234
232
long double (log2l)(long double x)
235
long double (log2l)(long double x)
233
{
236
{
234
  static long double polevll(long double, long double *, size_t);
235
  static long double p1evll(long double, long double *, size_t);
236
237
  static long double P[] = {
237
  static long double P[] = {
238
    4.9962495940332550844739E-1L,
238
    4.9962495940332550844739E-1L,
239
    1.0767376367209449010438E1L,
239
    1.0767376367209449010438E1L,
Lines 362-372 Link Here
362
362
363
#define SQRTHL	0.70710678118654752440L
363
#define SQRTHL	0.70710678118654752440L
364
364
365
static long double polevll(long double, long double *, size_t);
366
static long double p1evll(long double, long double *, size_t);
367
365
long double (log10l)(long double x)
368
long double (log10l)(long double x)
366
{
369
{
367
  static long double polevll(long double, long double *, size_t);
368
  static long double p1evll(long double, long double *, size_t);
369
370
  /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
370
  /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
371
   * sqrt(2) Theoretical peak relative error = 6.2e-22
371
   * sqrt(2) Theoretical peak relative error = 6.2e-22
372
   */
372
   */
Lines 497-507 Link Here
497
#define LOG2EA	0.44269504088896340735992	/* log2(e) - 1 */
497
#define LOG2EA	0.44269504088896340735992	/* log2(e) - 1 */
498
#define SQRTH	0.70710678118654752440
498
#define SQRTH	0.70710678118654752440
499
499
500
static double polevl(double, double *, size_t);
501
static double p1evl(double, double *, size_t);
502
500
double (log2)(double x)
503
double (log2)(double x)
501
{
504
{
502
  static double polevl(double, double *, size_t);
503
  static double p1evl(double, double *, size_t);
504
505
  /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
505
  /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
506
   * sqrt(2)
506
   * sqrt(2)
507
   */
507
   */

Return to bug 115731