delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/08/06:46:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=xdSwyJHmkMtWI7CplF2sqnP9RNF7XNlxUObqx4kleB+GkoJvIhLQ2
fjBqcNcSDmJAmoSEBXeab5Dfxh7bErf6JAkooolO8iNWJ0UQaOu+d5mCpYDdF29N
n7KD6CQWpt4nU1aUibFjuHEDPa/Zg/VsqCpmC6TbbpJ/uRMI2PAfCE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=jInK69sIfzYvCpUR5tgLXzykdV8=; b=PVNKSvLOmosITF3LQ2pOv+PsKWZz
WDgdSjtqqKflammvS+DS+xn+sW4bJCLelfj2VZk3gTkxAokI0jYlvrF8o+x8BVgj
2n4x7gi+Zyg4dtWxhi6eMgljME1dTX14P3il1d4vtv7MZrZa0MR0pZMmfSB9S9lb
odT/WRrOdMyg778=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Fri, 8 Aug 2014 12:46:04 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: suggestion about math.h
Message-ID: <20140808104604.GZ13601@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <8437F00B-0E62-4F8A-9B4C-B7425545289F AT Denis-Excoffier DOT org> <53E3C0FA DOT 9000703 AT aol DOT com>
MIME-Version: 1.0
In-Reply-To: <53E3C0FA.9000703@aol.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

--ixDgnS8AC6zwmyK0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug  7 14:10, Tim Prince wrote:
>=20
> On 8/7/2014 1:41 PM, Denis Excoffier wrote:
> >Hello,
> >
> >Perhaps the values of some constants are not as accurate as they should =
be? See also M_LN2LO and M_LN2HI.
> >
> >diff -uNr cygwin-snapshot-20140807-1-original/newlib/libc/include/math.h=
 cygwin-snapshot-20140807-1-patched/newlib/libc/include/math.h
> >--- cygwin-snapshot-20140807-1-original/newlib/libc/include/math.h	2014-=
08-07 18:26:21.000000000 +0200
> >+++ cygwin-snapshot-20140807-1-patched/newlib/libc/include/math.h	2014-0=
8-07 19:31:51.000000000 +0200
> >@@ -569,14 +569,14 @@
> >  #ifndef __STRICT_ANSI__
> >  #define M_TWOPI         (M_PI * 2.0)
> >-#define M_3PI_4		2.3561944901923448370E0
> >-#define M_SQRTPI        1.77245385090551602792981
> >+#define M_3PI_4		2.3561944901923449288E0
> >+#define M_SQRTPI        1.77245385090551602729817
> >  #define M_LN2LO         1.9082149292705877000E-10
> >  #define M_LN2HI         6.9314718036912381649E-1
> >-#define M_SQRT3	1.73205080756887719000
> >+#define M_SQRT3	1.73205080756887729353
> >  #define M_IVLN10        0.43429448190325182765 /* 1 / log(10) */
> >  #define M_LOG2_E        _M_LN2
> >-#define M_INVLN2        1.4426950408889633870E0  /* 1 / log(2) */
> >+#define M_INVLN2        1.4426950408889634074E0  /* 1 / log(2) */
> >  /* Global control over fdlibm error handling.  */
> >
> >
> >
> Without the L suffix, it doesn't look like it matters.
> I just noticed this week the M_LN2LO and HI.  They should add up to a long
> double accurate constant.  I've been using a similar pair in implementati=
on
> of exp() for 20 years.

Uhm, I'm not exactly a math expert so I won't try to contribute.

However, given that this file is from newlib, it would be more helpful
to discuss this on the newlib AT sourceware DOT org mailing list.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--ixDgnS8AC6zwmyK0
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJT5KpsAAoJEPU2Bp2uRE+gbW4QAIRtLuimY1uyONjeuEh4x25y
vCHU2NVhEzmcBYAN5ZmPic0dIX1RqE/lSYNass3uRWxZ+F2eMFa70hjm58xH4XeU
2kZNLFA/Ol8XCEzoP/RyLPHkggTWE8feO9j16OVV5mRNqpw6FHy8pQKQOVyYyOGj
HkOp/oQ9sUyGCwGmo7wkGp1Pb+UddeMbn6kLNrtaWmgLvBrtzT58s5pT4qUagagQ
jRkgyCkNPvL3YRT9xoziHV55t7mw+LHQA6dYRXeSgSYTwrdSrdTCgfLkxEWHizwF
K4MGcoWU/iVg3lUHf4BMYX0QGa8UA4Y+/jDWU/TNpzJFsPjeDAFJsVE9UCl+FjvI
AkC2RrrnKK2pehRibfe5LVl3lkvdNaRW4owYt91dYCHsNrNGHdlif5t4zrEGgPkm
vKO7fiHQJlnkLOojDofPd15j9dDjS0oOuXk1CCA6q0pAyT72pKkFP0Qr3FL5QM38
xbee4uuS5fFxkA8ne12J3oEvpocRuZ0OkmJTLiS6TbUFcQq26xBNkvCKnv0E4LvE
J39p+36Y93OuJsQ24Is+zvn9yzTcT9wLszmMIaYFnCeF2mDrn8aoRHD6K7m/aZ7o
VuFGRFu7K9L4Jyh8bwoojxKZzAmpThYgwTC5w/q8aN4OWXEy2LLr28R8fENM4apc
+Ez77z3+i8thu8DblGkW
=enmy
-----END PGP SIGNATURE-----

--ixDgnS8AC6zwmyK0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019