From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1625 invoked by alias); 25 Jul 2011 19:55:18 -0000 Received: (qmail 1614 invoked by uid 22791); 25 Jul 2011 19:55:17 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_FD X-Spam-Check-By: sourceware.org Received: from tirion.supremecenter202.com (HELO tirion.supremecenter202.com) (209.25.195.243) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 19:55:01 +0000 Received: from [195.189.206.101] (port=52550 helo=[192.168.209.11]) by tirion.supremecenter202.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1QlREx-0003jF-KK; Mon, 25 Jul 2011 19:54:59 +0000 Message-ID: <4E2DCA10.2090108@siva.com.mk> Date: Mon, 25 Jul 2011 19:55:00 -0000 From: Ilija Kocho User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110628 Thunderbird/5.0 MIME-Version: 1.0 To: Sergei Gavrikov CC: eCos developers Subject: Re: Single precision math library, porting to eCos. References: <4E253131.3030607@siva.com.mk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2011-07/txt/msg00007.txt.bz2 Hello Sergei Many thanks for your comments. On 25.07.2011 19:44, Sergei Gavrikov wrote: > On Tue, 19 Jul 2011, Ilija Kocho wrote: > >> Hello colleagues > > Hello Ilija, > > my $0.02. > >> We are working on a port of Newlib's single precision math library >> /float/ type functions/. We are going to contribute the port, so we >> would like to know if there is interest to incorporate it into main >> eCos tree. > It's very excited and honour task. But, AFAIK, eCos libm are based on > Free Domain Libm fdlibm 5.X (5.2?). The *fdlibm* is a part of netlib > software collection, the references: Thanks for the reference. Comparing double precision functions from eCos and Newlib, some time ago, (and not having complete history information) I got impression that eCos library is coming from Newlib. Now, following your pointers, I have looked at fdlibm, it seems that both eCos and Newlib stem from fdlibm (or all 3 from same origin). However both fdlibm and Newlib files have same copyright messages so I think we can safely use either. >From first view I could see that fdlibm does not have single precision functions. Newlib does have them, according to file header converted from double by Cygnus (I guess Newlib and eCos are siblings :) What we are doing in SIvA is to bring Newlib's /float/ to eCos following likeness and differences against /double/ library. One of larger differences are tests. http://ecos.sourceware.org/ml/ecos-devel/2011-07/msg00004.html > > http://www.netlib.org/ > http://www.netlib.org/fdlibm/ > > and it (fdlibm) is labeled as > > C math library for machines that support IEEE 754 floating-point > >> Rartionale: Some recent/upcoming architectures such as Cortex-M4, >> Cortex-R, MPC 55xx can execute single precision floating point in >> hardware. This is also recognised by GCC, for instance GCC 4.6 can >> generate /-mhard-float/ code for Cortex-M4. > Good point. > > But, may be first you would look on *Cephes Mathematical Library* > > http://www.netlib.org/cephes/singldoc.html Thank you for this pointer too. This is interesting, but probably it will take more time and I guess would be more radical addition for eCos. Our current project does not change anything essential in current eCos library, but merely extends the headers, makefiles and directory tree with added float functions. The float functions are already integrated in the eCos tree and we can compile and run the tests that come with Newlib, but as Visar pointed we are looking for further verification. > > It would be nice to get a set of single precision special math functions > like logf(), sinf(), cosf(), etc. as eCos math alternative which cephes > provides us. But, this is my brief view only. It seemed for me that to > get *cephes* under eCos is less complex task than to port the same part > from NewLib (may be I wrong, I have not dived in the subject). > > In any case I like your idea to use hardware for single precision > calculations and value your efforts in this direction. Thank you. Regards Ilija