delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <newlib AT sourceware DOT org> |
Cc: | <cygwin AT cygwin DOT com> |
References: | <20070829153331 DOT GA95558 AT tetsuo DOT karasik DOT eu DOT org> <46D5A79E DOT C09EF7CE AT dessent DOT net> <003201c7ea5f$d01db8f0$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <46D5AD5A DOT B110DBB6 AT dessent DOT net> |
Subject: | RE: 1.5.24: sin() bug |
Date: | Wed, 29 Aug 2007 19:22:09 +0100 |
Message-ID: | <003601c7ea69$83095100$2e08a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Office Outlook 11 |
In-Reply-To: | <46D5AD5A.B110DBB6@dessent.net> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On 29 August 2007 18:31, Brian Dessent wrote: > Dave Korn wrote: > >> Since when was pi less than 2^-27? > > This is a kernel sin, a function over the limited range [-pi/4, pi/4], > where the general case sin is reduced to kernel sin by the remainder of > modulus pi/2. Ah, I see. >> I think it may be an artefact of FP precision and/or rounding mode, but >> I'd need to do more experiments to make sure. OTOH it could be an >> artifact of the printf %g specfier. Like I said, more experimentation is >> needed! > > A problem with the testcase is the .10. It helps to expand that so that > you see the entire value. Or use %a. newlib returns 3CED1A62633145C0 > whereas both MSVCRT and x86 linux seem to return 3CED1A6000000000. It > sort of looks like a truncation problem but since glibc agrees with > msvcrt (shock!) I tend to think the latter is right. The actual > mantissas are: > > newlib 1.1101000110100110001001100011001100010100010111000000 > other 1.1101000110100110000000000000000000000000000000000000 This looks more and more like an extended precision issue. Good ol' PR323! I'll dig out my fpctl macro and have a try... cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |