We are using CC2541, and I noticed these words in the IAR compiler reference:
Using floating-point types on a microprocessor without a math coprocessor is very
inefficient, both in terms of code size and execution speed. Thus, you should consider
replacing code that uses floating-point operations with code that uses integers, because
these are more efficient.
We do have some code for linear calculations. Something like:
(uint16)(x * 6.15 + 3.1)
Is it much slower than this alternative?
(uint16)(((uint32)x * 615 +310)/100)
Any suggestions would be appreciated.