From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21102 invoked by alias); 28 Jun 2013 17:26:40 -0000 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 Received: (qmail 21088 invoked by uid 89); 28 Jun 2013 17:26:39 -0000 X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 28 Jun 2013 17:26:38 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 471BB468001A for ; Fri, 28 Jun 2013 18:26:36 +0100 (BST) 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 cTByc-qZJ5tK; Fri, 28 Jun 2013 18:26:33 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001539] Single precision floating point math library Date: Fri, 28 Jun 2013 17:26:00 -0000 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: ilijak@siva.com.mk 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00047.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001539 --- Comment #46 from Ilija Kocho --- I just posted a collection of patches that apply changes announced in comments above. Ref: Comment #33 The inlining option CYGSEM_LIBM_IEEE_API_INLINE is applied to most of ieee754-api functions. This had an impact on math.h, but although it looks very different, with default CDL settings, after macro expansion, the legacy declarations are same as before. The inlining may suppress generation of GCC builtin functions so there is an override provision. The overriding is typically enforced by architecture HAL. As an example, overriding is implemented in Cortex-M architecture (precidely Cortex-M4F) for sqrtf() (Attachment 2295). For backward compatibility inlining is disabled by default. In reply to comment #25 John, Now all tests pass for IEEE mode. With CYGOPT_LIBM_COMPAT_POSIX_IEEE option enabled they pass for POSIX as well. The problem with frexpf() was a wrong test vector (the exponent part). I got the test generation program, adapted output to eCos port and generated correct test vectors. In reply to comment #28 and comment #30 Jifl, I added option CYGOPT_LIBM_COMPAT_POSIX_IEEE so now user can select whether on out-of-domain error functions return 0 or NaN. In order to provide same behavior for all double and single precision functions, the code from standard.c has moved in standard.inl, which is then included in bot standard.c and standard_float.c When CYGOPT_LIBM_COMPAT_POSIX_IEEE is enabled POSIX mode passes the test. When CYGOPT_LIBM_COMPAT_POSIX_IEEE is disabled i.e. functions return 0.0 the test fails. Following code snippet can make test pass (example acosf.h). Please advise. --- acosf.h------ +#if defined(CYGSEM_LIBM_COMPAT_IEEE_ONLY) || + defined (CYGOPT_LIBM_COMPAT_POSIX_IEEE) +#define EDOM_RETVAL (2143289344u) +#else +#define EDOM_RETVAL (0) +#endif static const Cyg_libm_test_float_vec_t acosf_vec[] = { -{0, 3214514586u, 1115684864u, 2143289344u, EDOM, ACOS_TOLERANCE, 0}, +{0, 3214514586u, 1115684864u, EDOM_RETVAL, EDOM, ACOS_TOLERANCE, 0}, ..... }; ---END----------- Ref comment #33 (again) Complex functions are added in attachment 2294. I have nothing to add to my discussion in comment 33 except a question: "Should we change the title of this bug?" Bottom line: Considering the size of this patches, I would invite all who had already commented (other people are welcome of course), to steal some time to do it again. I am testing on Cortex-M4 and it would be good if somebody could test on other platforms. Perhaps there may be interest to test this patches in a course of Gnutools test release tests? Ilija -- You are receiving this mail because: You are on the CC list for the bug.