Possible Duplicate:
Extract decimal part from a floating point number in C
I would like retrieve the decimal part of a double in the most efficient way.
Something like this:
double a = 1.5;
double decimal_part = a -1 ; // decimal_part = 0.5
How retrieve and store in a variable in a really efficient way the .5 (decimal part of a) ?