From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5311 invoked by alias); 29 Apr 2013 14:04:36 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 5281 invoked by uid 89); 29 Apr 2013 14:04:35 -0000 X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_NEUTRAL autolearn=no version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from popelka.ms.mff.cuni.cz (HELO popelka.ms.mff.cuni.cz) (195.113.20.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Apr 2013 14:04:35 +0000 Received: from domone.kolej.mff.cuni.cz (popelka.ms.mff.cuni.cz [195.113.20.131]) by popelka.ms.mff.cuni.cz (Postfix) with ESMTPS id 4DDB049987; Mon, 29 Apr 2013 16:04:30 +0200 (CEST) Received: by domone.kolej.mff.cuni.cz (Postfix, from userid 1000) id 0AB1E60470; Mon, 29 Apr 2013 16:03:49 +0200 (CEST) Date: Mon, 29 Apr 2013 14:04:00 -0000 From: =?utf-8?B?T25kxZllaiBCw61sa2E=?= To: bugdal at aerifal dot cx Cc: glibc-bugs@sourceware.org Subject: Re: [Bug math/14412] Removal of sysdeps/x86_64/fpu/s_sincos.S causes regressions Message-ID: <20130429140349.GB24033@domone.kolej.mff.cuni.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-04/txt/msg00223.txt.bz2 On Mon, Apr 29, 2013 at 01:28:10PM +0000, bugdal at aerifal dot cx wrote: > http://sourceware.org/bugzilla/show_bug.cgi?id=14412 > > --- Comment #33 from Rich Felker 2013-04-29 13:28:10 UTC --- > Ondrej, the results are not pure garbage. There are only two correct results > sin(0x1p1000) can give, either of the nearest representable neighbors (less > than 1ulp error) of the number 2**1000. Your fallacy is writing PI in your > example. There is no such floating point number as PI, and this is part of why > implementing correct trig functions is nontrivial; implementing ones that work > in degree units, or a base-2 division of the unit circle, would be much easier. > Ok, assume you wrote function cos_deg that takes input degree in degrees. You still have cosdeg(360*(2**60)) == cosdeg(360*(2**60)+180) In short when you have inputs with zero significant digits you can expect only garbage as output.