• Rounding floats to integers on Cortex-M4
    I've encountered an odd problem on STM32F4xx CPU with hardware FPU enabled: When rounding floats to integers, compiler always uses VCVT (round towards zero) instruction instead of VCVTR (round using...
  • rounding a float to an integer
    Hi all, I like to round a float to the nearest integer value and assign the value to an integer. How do I do that in C code? In know it is something with "round" but I can not find the proper syntacs...
  • Rounding floats to integers on Cortex-M4
    I've encountered an odd problem on STM 32F4xx CPU with hardware FPU enabled: When rounding floats to integers, compiler always uses VCVT (round towards zero) instruction instead of VCVTR (round using...
  • round result of floating point calcualtion
    Hello, I have a problem with the accuracy of the result when I divide 2 float values. This is the line in my source Code: dds_word.long_dds = 2.147483648E16 / 7.1312E7 The result which I...
  • Trouble with ints, floats and double
    I'm using the MCBSTM32C evaluation board. I would like to calculate the angle of the board in relation to the gravity vector. I have no prolems reading the accelerometer. I basically have the gravity...