??? 09/08/08 14:33 Read: times |
#158072 - No floating-point math required. Responding to: ???'s previous message |
Chris Bertrand said:
I was looking at linear interpolation equation to do this, but then it starts to involve floating point math which becomes a huge impact on code size and speed. Chris, especially for the case of linear interpolation, floating-point arithmetics should not be necessary. 32-bit fixed-point arithmetics should be as good, if not better than, floating-point calculations here, and much faster too. |
Topic | Author | Date |
Scale offset using ints by byte position location | 01/01/70 00:00 | |
Does type casting make sense here?... | 01/01/70 00:00 | |
Show us more......... | 01/01/70 00:00 | |
Here are defs and original function | 01/01/70 00:00 | |
ints, at leastin Keil, at 16 bits wide. | 01/01/70 00:00 | |
Christoph, | 01/01/70 00:00 | |
That makes things clearer. | 01/01/70 00:00 | |
A detail | 01/01/70 00:00 | |
Take a look at the ranges | 01/01/70 00:00 | |
Brett, that is helpful, I should add.... | 01/01/70 00:00 | |
No floating-point math required. | 01/01/70 00:00 | |
Its working but I have a question on theory | 01/01/70 00:00 | |
Rounding instead of truncate | 01/01/70 00:00 | |
oh, that is interesting | 01/01/70 00:00 | |
Russ' comment is right, though.![]() | 01/01/70 00:00 |