Click here to Skip to main content
16,016,087 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Fixed Point vs. Floating Point Pin
Russell'9-Sep-07 23:21
Russell'9-Sep-07 23:21 
GeneralRe: Fixed Point vs. Floating Point Pin
cp987610-Sep-07 1:06
cp987610-Sep-07 1:06 
AnswerRe: Fixed Point vs. Floating Point Pin
cp987610-Sep-07 0:53
cp987610-Sep-07 0:53 
AnswerRe: Fixed Point vs. Floating Point Pin
Luc Pattyn10-Sep-07 1:16
sitebuilderLuc Pattyn10-Sep-07 1:16 
GeneralRe: Fixed Point vs. Floating Point Pin
Leslie Sanford10-Sep-07 13:14
Leslie Sanford10-Sep-07 13:14 
GeneralRe: Fixed Point vs. Floating Point Pin
Luc Pattyn10-Sep-07 13:30
sitebuilderLuc Pattyn10-Sep-07 13:30 
GeneralRe: Fixed Point vs. Floating Point Pin
cp987610-Sep-07 14:00
cp987610-Sep-07 14:00 
AnswerRe: Fixed Point vs. Floating Point Pin
Stuart Dootson11-Sep-07 22:56
professionalStuart Dootson11-Sep-07 22:56 
Leslie Sanford wrote:
floating point seems faster


It will be - it's got a native, hardware implementation, whereas fixed point hasn't. In the best case (performance-wise) implementation of fixed point, additive operations should be transformed into single integer operations (unless you're checking for overflow, which'll add a whole lot more overhead, including branching). Multiplicative operations will require re-scaling of the output, which adds extra overhead as well.

I believe that modern CPUs do float operations in times comparable to the integer equivalents, so there's likely little or no performance hit from using floats.

I work with embedded control systems using relatively slow CPUs (ranging from 25MHz 680x0 to 150MHz PowerPC). We transitioned to using floating-point maths from fixed-point when we started using PowerPCs, because it performed as well (or better) than fixed point operations and also had a better range/precision trade-off than fixed-point.
Questionalgorithm help!?! Pin
marvc17-Sep-07 6:11
marvc17-Sep-07 6:11 
AnswerRe: algorithm help!?! Pin
Luc Pattyn7-Sep-07 6:56
sitebuilderLuc Pattyn7-Sep-07 6:56 
GeneralRe: algorithm help!?! Pin
Dan Neely7-Sep-07 10:17
Dan Neely7-Sep-07 10:17 
GeneralRe: algorithm help!?! Pin
Luc Pattyn7-Sep-07 10:50
sitebuilderLuc Pattyn7-Sep-07 10:50 
GeneralRe: algorithm help!?! Pin
Daniel Grunwald7-Sep-07 11:42
Daniel Grunwald7-Sep-07 11:42 
GeneralRe: algorithm help!?! Pin
Luc Pattyn7-Sep-07 12:15
sitebuilderLuc Pattyn7-Sep-07 12:15 
AnswerRe: algorithm help!?! Pin
Russell'8-Sep-07 0:22
Russell'8-Sep-07 0:22 
QuestionMagic squares in matlab Pin
Rami Y.5-Sep-07 17:19
Rami Y.5-Sep-07 17:19 
AnswerRe: Magic squares in matlab Pin
Russell'5-Sep-07 22:26
Russell'5-Sep-07 22:26 
QuestionFRACTAL FORMULAS Pin
cyndy_northrup4-Sep-07 21:50
cyndy_northrup4-Sep-07 21:50 
AnswerRe: FRACTAL FORMULAS Pin
Russell'4-Sep-07 22:57
Russell'4-Sep-07 22:57 
GeneralRe: FRACTAL FORMULAS Pin
cyndy_northrup5-Sep-07 15:10
cyndy_northrup5-Sep-07 15:10 
GeneralRe: FRACTAL FORMULAS Pin
Russell'5-Sep-07 22:09
Russell'5-Sep-07 22:09 
AnswerRe: FRACTAL FORMULAS Pin
Luc Pattyn4-Sep-07 23:06
sitebuilderLuc Pattyn4-Sep-07 23:06 
Questioncontiguous bits algorithm. Pin
chandu0042-Sep-07 22:09
chandu0042-Sep-07 22:09 
AnswerRe: contiguous bits algorithm. Pin
Russell'2-Sep-07 22:44
Russell'2-Sep-07 22:44 
AnswerRe: contiguous bits algorithm. Pin
cp98762-Sep-07 22:48
cp98762-Sep-07 22:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.