os/libc/math.c

16 lines
261 B
C
Raw Normal View History

2019-02-09 12:52:45 -06:00
float ceilf(float num) {
int inum=(int)num;
if (num==(float)inum) {
return (float)inum;
}
return (float)(inum+1);
}
2019-04-06 09:07:06 -05:00
double ceil(double num) {
int inum=(int)num;
if (num==(double)inum) {
return (double)inum;
}
return (double)(inum+1);
}