CMP - United Business Media TechOnline
All Articles Products Courses Papers VirtuaLabs Webinars Web



 
LoginRegister
      TechOnline > Learning >  Technical Paper
Technical Papers
Do the Math! An Introduction To Machine Calculations

Click to Download
pdf logo
2001 Embedded Systems Conference
San Francisco Paper
160 KB (16 pages)
April 2001
 

Gregory Massey
Acterna

Improvements in languages, compilers, hardware, and even standards continue to simplify the task of performing mathematical calculations in embedded systems. Even with these improvements, though, the calculations do not always perform as expected.

This paper compares the different types of machine calculations—integer, fixed point, and floating point—in terms of versatility, accuracy and speed. It looks at the sources of errors for each type and ways to manage them. It covers type conversions, overflow effects, implementation tricks, custom integer sizes, and machine dependencies. It shows how to implement fixed point math using integers and customize it to your needs. The emphasis is on simplicity and practicality. Examples are given in "C", although the concepts apply equally well to other programming languages.

 
Rate this paper
WORSE | BETTER
1 2 3 4 5

submit a paper
Follow Tech Papers

Embedded Systems Conference (ESC)
   

TECH PAPER
1. Use Rowley CrossWorks and the MAXQ3120 Evaluation Kit to Create a Light Meter Application

TECH PAPER
2. System ACE Configuration Solution for Xilinx FPGAs

TECH PAPER
3. Interface Products Design Guide

TECH PAPER
4. Maintaining Data/Clock Synchronization with Spread-Spectrum EMI Reduction