Tag Archives: math

Arduino s16.15 Fixed Point Math Routines

It is important to note, that fixed point math comes in many flavors. For example, a 16-bit integer can implement 31 different fixed point formats, signed and unsigned Q1 through Q16 (Q number format). A couple of popular 16-bit formats … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , | Leave a comment

AVR GCC Fixed-Point vs. Floating Point Comparison

This is a follow up to previous posts here and here. Using native fixed point support in GCC, on a generic ATMega328P running 16MHz on the AtmelStudio 6.2 simulator, I performed this overly simplified comparison of fixed vs. floating point … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | 7 Comments

A Note about GPS Precision and Floating Point Math

Do you suspect your GPS is not accurate enough? Maybe the GPS accuracy is not the fault, it could be the precision. And it might not be the precision of the GPS, it could be a floating point math issue. … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Continued Look at Fixed Point Math on the Arduino Platform

Continuing my overly simplified comparison of 24.8 fixed point vs. floating math on the AVR168/328 chip, I compared the elapsed time of the following two division operations running at 16Mhz: That’s nearly 1.8 times faster for the fixed-point math. If … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Fixed Point Math on the Arduino Platform

Here is an overly simplified comparison of 24.8 fixed point vs. floating math on the AVR168/328 chip. I compared the elapsed time of the following two multiplications running at 16Mhz: That’s nearly 9.5 times faster. However, my comparison is not … Continue reading

Posted in Uncategorized | Tagged , , , , , | 11 Comments