From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16729 invoked by alias); 22 Feb 2008 09:01:35 -0000 Received: (qmail 16616 invoked by uid 48); 22 Feb 2008 09:00:56 -0000 Date: Fri, 22 Feb 2008 09:01:00 -0000 Message-ID: <20080222090056.16615.qmail@sourceware.org> From: "grugh at centrum dot cz" To: glibc-bugs@sources.redhat.com In-Reply-To: <20080221091038.5781.grugh@centrum.cz> References: <20080221091038.5781.grugh@centrum.cz> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug math/5781] Slow sine function for special values on AMD64 - second attempt X-Bugzilla-Reason: CC 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 X-SW-Source: 2008-02/txt/msg00099.txt.bz2 ------- Additional Comments From grugh at centrum dot cz 2008-02-22 09:00 ------- Is there any compile flag or #define, which can disable the <=0.5 ulp precision and the math sin function will use only the fast built-in fp intructions? For our real-time software it is necessary to be "quick", the ultra precision has low priority. Now we are using a workaround: I can put the original argument to long double variable and call sinl function with long double result. Both, the new argument and the result, have to be volatile to disable the compiler optimization of it (probably uses the "fast" sin instead). Results of sin(0.93340582292648832662962377071381) ---------------------------------------------------- distr function value result_type printf_format -------------------------------------------------------------------- 32 sin 0.80365140438773496889268699305831 double "%.32g" 32 sinl 0.80365140438773496889268699305831 double "%.32g" 32 sinl 0.80365140438773491338153576180048 long double "%.32Lg 64 sin 0.80365140438773485787038453054265 double "%.32g" (~ -5.5511151231257827021181583404541e-17 difference from 80bit value) 64 sinl 0.80365140438773496889268699305831 double "%.32g" (~ +5.5511151231257827021181583404541e-17 difference from 80bit value ) 64 sinl 0.80365140438773491338153576180048 long double "%.32Lg" -- http://sourceware.org/bugzilla/show_bug.cgi?id=5781 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.