cancel
Showing results for 
Search instead for 
Did you mean: 

Double (or float) division does not work

JR2963
Senior II

Hi,

on STM32H7 I want to divide 25600/1000 - I get always result = 25. Why? What I do wrong?

double 		freq;
int                    odr=25600;
 
freq = (double) (odr)/1000;

Thank you

11 REPLIES 11
S.Ma
Principal

One last thing, refrain from using float and double under interrupt.