From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4691 invoked by alias); 22 Mar 2012 18:05:59 -0000 Received: (qmail 4610 invoked by uid 22791); 22 Mar 2012 18:05:54 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_FN X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Mar 2012 18:05:40 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 93A032F78015 for ; Thu, 22 Mar 2012 18:05:39 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sNG1V+9xR9+6; Thu, 22 Mar 2012 18:05:36 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001539] Single precision floating point math library X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: sergei.gavrikov@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 22 Mar 2012 18:05:00 -0000 Message-Id: <20120322180536.CBC052F78005@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-03/txt/msg00110.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001539 --- Comment #20 from Sergei Gavrikov 2012-03-22 18:05:34 GMT --- (In reply to comment #19) > > Tests expect NaN for out-of-domain arguments, but functions return > > something else. For instance asinf(10) returns 0. Here is a little > > example: > > IMO, it can depend on libm compatibility, look at libm compat. > wrappers (w_*.c), e.g. at w_asin{,f}.c. Though, I think in our case > it should be a result of call __ieee754_asin{,f}(). And if libm > compat mode is not IEEE? I'm looking at misc/standard.c > (__kernel_standard)... Well, I understand what is wrong. Let's take `wf_asin.c', "i wonder" hack: --- a/packages/language/c/libm/current/src/float/ieee754-api/wf_asin.c +++ b/packages/language/c/libm/current/src/float/ieee754-api/wf_asin.c @@ -88,8 +88,10 @@ #ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY return __ieee754_asinf(x); #else - double z; + float z; z = __ieee754_asinf(x); + printf("__ieee754_asinf(%f)=%f\n", x, z); + return z; if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnanf(x)) return z; if(fabs(x)>1.0) { return __kernel_standard(x,x,2); /* asin(|x|>1) */ Then let's run `asinf' (a picture worth more than many words) INFO: __ieee754_asinf(-1.200000)=nan __ieee754_asinf(-1.190000)=nan ... __ieee754_asinf(-1.010000)=nan __ieee754_asinf(-1.000000)=-1.570796 ... __ieee754_asinf(0.000000)=0.000000 __ieee754_asinf(0.000000)=0.000000 INFO: __ieee754_asinf(0.000000)=0.000000 PASS: EXIT: Thus, IMHO, you have to implement own __kernel_standard_float() and maybe another "float" wrappers to peace failed f-tests. FYI, import cdl_option CYGSEM_LIBM_COMPAT_IEEE_ONLY { user_value 1 }; breaks build of single precision tests. Some your headers have EDOM used, but this value is not defined for such config conditions. Perhaps, you need weak definition for that in `vector_support_float.h' header. // Not tested #ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY # ifndef EDOM # define EDOM 33 # endif #endif Sergei -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.