• Getting odd floating point results.
    ((lat2-lat1)*BETA*(lat2-lat1)*BETA + (long2-long1)*delta*(long2-long1)*delta) I'm writing some C code and I am getting some screwy results. Basically lat1, lat2, long1, long2 are all latitudes and...
  • 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...
  • 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...
  • floating point
    Hi every body I don't know why I don't have the float part of the temp var. float temp; int H_Value; int L_Value; int value = 55; temp = value / 10; H_Value = (int)temp; L_Value = (int)(temp...