Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top