Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Compiler/TMS320F28377S: Casting and approximation

$
0
0

Part Number:TMS320F28377S

Tool/software: TI C/C++ Compiler

Hi all,

I need detailed information about Compiler behaviour to solve the following issue:

I have a float data angle = -95.9875, then data angle is multiplied by 100 obtaining -9598.75.

After multiplication, data is casted from float to int and data stored is -9599 ! It seems has been approximated and not truncated as I expected.

Is the data approximated before being casted?

Where can I find info relevant to this situation?

I am using TI CCS v.6.4.11

Thank you very much.

Flo


Viewing all articles
Browse latest Browse all 262198

Trending Articles