| | C standard functions with legOS? Michael Wisse
|
| | Is it possible to use functions from C standard libraries with legOS, e.g. sin() from math.h or abs() from stdlib.h? They are a part of gcc, but e.g. math.h seems to produce compiler errors. Best regards. Michael Wisse (24 years ago, 25-Apr-01, to lugnet.robotics.rcx.legos)
|
| | |
| | | | Re: C standard functions with legOS? Ross Crawford
|
| | | | (...) The cross-compiler is set up to not use standard libraries. This is to give more control over the code produced. Also, many standard functions just wouldn't work on the H8. There is a float library (lib/float), which allows use of floating (...) (24 years ago, 25-Apr-01, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: C standard functions with legOS? Bernardo Dal Seno
|
| | | | | (...) An alternative is using fixed point math. There was some posts time ago, with C source for trigonometric functions. If you are interested, I should have links to them, somewhere (or do a `search' :-). bye Bernardo New e-mail: (...) (24 years ago, 26-Apr-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | | | | Re: C standard functions with legOS? Michael Ash
|
| | | | | (...) I've been meaning to butt in on this discussion sometime, but I got caught up in things, but better late than never. The source you refer to is probably mine. I wrote a suite of fixed-point math routines for multiplication, division, and (...) (24 years ago, 27-Apr-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | Re: C standard functions with legOS? Kieran Elby
|
| | | | (...) As other people have pointed out, its not possible to use them straight off. I've written some floating point code for my own use to do conversions between rectangular (x,y) and polar (dist, bearing) calculations. The codes not documented I'm (...) (24 years ago, 27-Apr-01, to lugnet.robotics.rcx.legos)
|
| | | | |