fork(1) download
  1. /* modf example */
  2. #include <stdio.h> /* printf */
  3. #include <math.h> /* modf */
  4.  
  5. int main ()
  6. {
  7. double param, fractpart, intpart;
  8.  
  9. param = 3.14159265;
  10. fractpart = modf (param , &intpart);
  11. printf ("%f = %f + %f \n", param, intpart, fractpart);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
3.141593 = 3.000000 + 0.141593