[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r22093 - in /fsf/trunk/libc: ./ sysdeps/ieee754/dbl-64/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r22093 - in /fsf/trunk/libc: ./ sysdeps/ieee754/dbl-64/
- From: eglibc@xxxxxxxxxx
- Date: Sun, 30 Dec 2012 00:04:03 -0000
Author: eglibc
Date: Sun Dec 30 00:03:59 2012
New Revision: 22093
Log:
Import glibc-mainline for 2012-12-30
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/sysdeps/ieee754/dbl-64/branred.h
fsf/trunk/libc/sysdeps/ieee754/dbl-64/dla.h
fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Dec 30 00:03:59 2012
@@ -1,3 +1,13 @@
+2012-12-29 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ * sysdeps/ieee754/dbl-64/branred.h: Include dla.h.
+ (split): Use macro CN instead of the bare value.
+ * sysdeps/ieee754/dbl-64/dla.h: Add comment to explain why CN
+ could be used.
+ * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Use CN
+ instead of the bare value.
+ (power1): Likewise.
+
2012-12-28 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
* sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Remove
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/branred.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/branred.h (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/branred.h Sun Dec 30 00:03:59 2012
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2012 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -26,6 +26,7 @@
#ifndef BRANRED_H
#define BRANRED_H
+#include <dla.h>
#ifdef BIG_ENDI
static const mynumber
@@ -74,6 +75,6 @@
12618859.0, 4703257.0, 12806093.0, 14477321.0, 2786137.0,
12875403.0, 9837734.0, 14528324.0, 13719321.0, 343717.0 };
-static const double split = 134217729.0;
+static const double split = CN; /* 2^27 + 1 */
#endif
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/dla.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/dla.h (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/dla.h Sun Dec 30 00:03:59 2012
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2012 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -34,7 +34,8 @@
/* IEEE double. */
/***********************************************************************/
-/* CN = 1+2**27 = '41a0000002000000' IEEE double format */
+/* CN = 1+2**27 = '41a0000002000000' IEEE double format. Use it to split a
+ double for better accuracy. */
#define CN 134217729.0
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c Sun Dec 30 00:03:59 2012
@@ -95,10 +95,10 @@
if (ABS (y) < 0x1p-64)
y = y < 0 ? -0x1p-64 : 0x1p-64;
z = log1(x,&aa,&error); /* x^y =e^(y log (X)) */
- t = y*134217729.0;
+ t = y*CN;
y1 = t - (t-y);
y2 = y - y1;
- t = z*134217729.0;
+ t = z*CN;
a1 = t - (t-z);
a2 = (z - a1)+aa;
a = y1*a1;
@@ -182,10 +182,10 @@
power1(double x, double y) {
double z,a,aa,error, t,a1,a2,y1,y2;
z = my_log2(x,&aa,&error);
- t = y*134217729.0;
+ t = y*CN;
y1 = t - (t-y);
y2 = y - y1;
- t = z*134217729.0;
+ t = z*CN;
a1 = t - (t-z);
a2 = z - a1;
a = y*z;
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits