This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Type casting integer to float ?

Dear Members,

I want to convert uint32_t to float, the code :

unsigned int dat = 2248;
	float float_val;
	
	

    float_val = (double)(dat);                         
    NRF_LOG_INFO( "float_val = %.3f\n", float_val );  

It's returning nothing, what is missing here ?

Thanks

Related