This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/EVM430-FR6047: Rounding off of float values

Part Number: EVM430-FR6047

Tool/software: Code Composer Studio

Hello,

When I am evaluating large float values, using sprintf and sending over UART, there is a rounding off which is being observed. Why is this happening? How can I avoid this? values lesser than 10000000, work fine with this addition.

float check = 10000000;
check = check + 1.5;

len = strlen(stringTemp);
sprintf(stringTemp, "%15.3f", check);

for(i=0; i<len; i++){
while(!(UCA0IFG&UCTXIFG));
UCA0TXBUF = stringTemp[i];
}

Regards,

Prudhvi Sagar