math function on elinos kernel

math function on elinos kernel

Post by phil_p » Wed, 22 Jan 2003 22:55:56



hello,

I need to use math functions (sin, cos, ....) on an embeded elinos system.

the #include math.h is ok
at link level the sin, cos ... functions are undefined

How (and where) do I have to configure the elinos kernel in order
to be able to call those functions in my project ??

thanks very much

Philippe

 
 
 

math function on elinos kernel

Post by Robert Kais » Wed, 22 Jan 2003 23:51:41




Quote:> I need to use math functions (sin, cos, ....) on an embeded elinos system.

> the #include math.h is ok
> at link level the sin, cos ... functions are undefined

  ^^^^^^^^^^^^^
"Link level" implies that this has nothing to do with the kernel (*).

Quote:

> How (and where) do I have to configure the elinos kernel in order
> to be able to call those functions in my project ??

It is also not specific to elinos: if you try to compile your
program on your host computer using it's native toolchain, it
will likely show the same behavior (my SuSE 8.0 system does).

The math functions are provided by the math library (libm.a).
Unlike the C library (which provides many functions, printf()
probably being the most popular one), the math library is not
linked in by default.

Solution: Add '-lm' to your linker commandline.

Rob

(*) As for the kernel (elinos or other): if your processor has no
    built-in floating point unit (e.g. i386/i486SX), you must enable
    the "math emulation" under "processor type and features"

--
Robert Kaiser                     email: rkaiser AT sysgo DOT de
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.de

 
 
 

math function on elinos kernel

Post by phil_p » Thu, 23 Jan 2003 16:26:46


thanks very much Robert !

what about training session on ELinOS system ?
I'm using a PPC MEN A12 Board .

Read you soon
Phil

 
 
 

math function on elinos kernel

Post by Robert Kais » Thu, 23 Jan 2003 18:45:46




Quote:> thanks very much Robert !

You're welcome.

Quote:> what about training session on ELinOS system ?

We offer these as a customer service (for a price, mind you ;-)).
Contact our sales people if you are interested.

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT de
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.de

 
 
 

1. Help - math functions in kernel

Hi,

I would appreciate it if someone could help me on this.  I'm not kernel
expert at all.

Q1: what types of math functions does kernel provide (+, -, *, /, what
else?), and which header files contain those math functions' declarations?

Q2: I need bignum functions in kernel space, but Linux gmp lib only provides
bignum functions in userland.  Is it possible to port it to kernel, and how?

Q3: Is there any open src project/files of bignum functions for  kernel?

Thanks.

Ls

2. Unix Music?

3. ELinOs - kernel compilation failed if rolo_rawdisk is used

4. Help: absolute positions in fvwm

5. Replace Kernel in Elinos

6. IP masquerading and broken sites.

7. BSD math library function equivs in Solris 2.2

8. MINICOM and line feeds

9. Linux intrinsic string and math functions...

10. Math functions in shell script?

11. How do I get gcc to link in math functions?

12. Newbie question: missing math.h functions?

13. Functions in math.h don't seem to work...