public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Ilija Kocho <ilijak@siva.com.mk>
To: Sergei Gavrikov <sergei.gavrikov@gmail.com>
Cc: eCos developers <ecos-devel@ecos.sourceware.org>
Subject: Re: Single precision math library, porting to eCos.
Date: Mon, 25 Jul 2011 19:55:00 -0000	[thread overview]
Message-ID: <4E2DCA10.2090108@siva.com.mk> (raw)
In-Reply-To: <alpine.DEB.2.00.1107252020220.3020@sg-laptop>

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

      reply	other threads:[~2011-07-25 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19  7:25 Ilija Kocho
2011-07-25 17:44 ` Sergei Gavrikov
2011-07-25 19:55   ` Ilija Kocho [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E2DCA10.2090108@siva.com.mk \
    --to=ilijak@siva.com.mk \
    --cc=ecos-devel@ecos.sourceware.org \
    --cc=sergei.gavrikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).