modf instruction in C language

Status
Not open for further replies.

Tulipmania

Newbie level 4
Joined
Jan 6, 2006
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,348
float modf(float x, float *ipart)

splits the floating point number x into integer and fractional components.
The fractional part of x is returned as a signed floating point number.
The integer part is stored as floating point number at ipart.

"how would be the format of the instruction if i want to split the float number 22.5?"
what is the format of the function prototype and the function call?
 

float IntegerPart_f;
float FractionalPart_f;

FractionalPart_f = modf(22.5, &IntegerPart_f);

Gomez
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…