Question
Cortex M4 Float to int: Round to Nearest / VCVTR?
Posted on June 12, 2015 at 12:31
Is there any way to convince the Keil/ARM MDK compiler to use the VCVTR command to convert floats to ints?
That would be extremely nice.
Currently the compiler seems to use always the VCVT, but this rounds towards zero.
With the VCVTR command it is possible to round automatically towards nearest integer ...
Any idea?
Anybody knows how this is solved in GCC / IAR?