To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 120
119  |  121
Subject: 
Re: floats
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 12 Apr 1999 05:33:06 GMT
Viewed: 
1159 times
  
Luis Villa  <liv@duke.edu> wrote:
When I try to use a float in my code, I get a compiler message somewhere
along these lines:

So- can anyone explain to me exactly what the limits are? Can I use
floats? Are other types affected? Do I have to define them in a particular
way? Or do I just need to hack around this? I mean, it's not too difficult
(particularly in this case) but it would be nice to know. Any thoughts
would be appreciated...

The errors you see are due to the fact that there is no hardware support
for floating point.  The compiler substitutes calls to the software
equivalents, which do not exist; hence the linker errors you see.

The math routines that do exist are integer only, and I believe all the
basic operators (+, -, *, /, %, =, !=, <, >, <=, >=) are supported for
signed and unsigned chars, shorts, and longs.

If you can get away with it, I would highly recommend using fixed point
math instead of floating point math.

-Kekoa



Message has 1 Reply:
  Re: floats
 
Thanks, Kekoa. (...) Well, as it appears I don't have much of an option, I'll stick to ints then :-) -Luis ###...### "They call the faithful to their knees to hear the softly spoken magic spell:" "There's no place like home... There's no place like (...) (26 years ago, 12-Apr-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  floats
 
When I try to use a float in my code, I get a compiler message somewhere along these lines: <begin error message> ../code/light-brait....t-brait.c: undefined reference to `__floatsisf' ../code/light-brait....t-brait.c: undefined reference to (...) (26 years ago, 12-Apr-99, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR