AnsweredAssumed Answered

Cortex M4 Float to int: Round to Nearest / VCVTR?

Question asked by bil.til on Jun 12, 2015
Latest reply on Jun 12, 2015 by bil.til

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?

Outcomes