public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* Single precision math library, porting to eCos.
@ 2011-07-19  7:25 Ilija Kocho
  2011-07-25 17:44 ` Sergei Gavrikov
  0 siblings, 1 reply; 3+ messages in thread
From: Ilija Kocho @ 2011-07-19  7:25 UTC (permalink / raw)
  To: eCos developers

Hello colleagues

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.

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.

Regards

Ilija Kocho, manager
SIvA doo
http://www.siva.mk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Single precision math library, porting to eCos.
  2011-07-19  7:25 Single precision math library, porting to eCos Ilija Kocho
@ 2011-07-25 17:44 ` Sergei Gavrikov
  2011-07-25 19:55   ` Ilija Kocho
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Gavrikov @ 2011-07-25 17:44 UTC (permalink / raw)
  To: Ilija Kocho; +Cc: eCos developers

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:

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

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.


Sergei

> Regards
> 
> Ilija Kocho, manager
> SIvA doo
> http://www.siva.mk
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Single precision math library, porting to eCos.
  2011-07-25 17:44 ` Sergei Gavrikov
@ 2011-07-25 19:55   ` Ilija Kocho
  0 siblings, 0 replies; 3+ messages in thread
From: Ilija Kocho @ 2011-07-25 19:55 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: eCos developers

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-25 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19  7:25 Single precision math library, porting to eCos Ilija Kocho
2011-07-25 17:44 ` Sergei Gavrikov
2011-07-25 19:55   ` Ilija Kocho

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).