Go to Post Like fishing, some may get away as you are reeling them in, but never letting out enough line to get the big ones at the bottom is just disappointing. - Eric O [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 02-02-2005, 00:24
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Floats

Quote:
Originally Posted by steven114
Don't worry about it until you run into problems.
This is definately NOT a good engineering principle. One of the many unwritten laws of engineering failure is that the problem will occur in the most inopportune time. What if professionals did this? What if automotive guys said that there's a problem with the brake system, but we'll take care of it when the problem shows up. What if the communications guys said that there's a problem in making phone calls when the system is under load, but we'll wait until the problem shows up during the Super Bowl to fix it?

The point is that if you know that something will cause a problem in the future, design your system in such a way that you never get yourself into that situation.

Quote:
Preemptive optimization almost always goes to waste, as the chip is so fast that you (usually, there are exceptions) can't feed it data fast enough to use all its processing power.
Wanna bet. If you get enough code running in your loop you can easilly get the RC to miss packets. Trust me, we've been there.

Quote:
If a variable is best stored as a float, use one. If it's an integer, use one of those.
This might be the case in a non-embedded environment, but in a case that you have limited resources, you don't want to go around wasting valuable cycles doing float calculations if you can get away with integer math. For each float operation that you do you probably add a dozen or more assembly instructions.

Also floats take up more program space, which is definately a valueable commodity.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Favorite Monty Python Sketch/Movie Joe Matt Chit-Chat 47 30-03-2004 21:45
EduCAD and Arrays!!!!! Sachiel7 Programming 14 03-11-2003 03:21
Exponenets and floats Jonbca Programming 4 31-01-2003 08:28


All times are GMT -5. The time now is 20:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi