Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/13/03 16:47
Read: times


 
#41450 - RE: Floating point maths
Responding to: ???'s previous message
To get a "feel" for how long floating-point math operations take, check the following benchmarks on the Keil web site:



You can enter your MCU clock speed along with the instruction clock divisor to see how long these operations take (with the Keil tools).

As far as "does anyone use floating-point", I'm certain the answer is YES.

The amount of MATH I need to do is what determines if I will use floating-point.

If I just need a number with a decimal point AND if I don't need any of the standard C math routines (trig, log, and so on), I store the number in a long and then normalize it each time I output it.

If the number is too big for a long, I create a struct with the integer and fraction part of the number.

If I need to perform any floating-point calculations, then I use floating-point.

FWIW, I've only needed to use floating-point math in one embedded application ever. It performed RMS calculations.

Jon

List of 8 messages in thread
TopicAuthorDate
Floating point maths            01/01/70 00:00      
   RE: Floating point maths            01/01/70 00:00      
      RE: Floating point maths            01/01/70 00:00      
   RE: Floating point maths            01/01/70 00:00      
      RE: Floating point maths            01/01/70 00:00      
         RE: Floating point maths Jon            01/01/70 00:00      
         RE: Floating point maths            01/01/70 00:00      
   RE: Floating point maths            01/01/70 00:00      

Back to Subject List