File: modf.c

package info (click to toggle)
linux86 0.16.21-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,072 kB
  • sloc: ansic: 66,757; asm: 6,154; makefile: 1,374; sh: 703
file content (14 lines) | stat: -rw-r--r-- 175 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <math.h>

/* Slooow version. */

double modf(x, pint)
double x;
double *pint;
{
    if (x >= 0)
	*pint = floor(x);
    else
	*pint = ceil(x);
    return x - *pint;
}