Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Implementing floor/ceil in C

Name: Anonymous 2011-06-01 13:00

how is it implemented

Name: Anonymous 2011-06-01 13:11

int floor(double d) {
   return round(d-0.5);
}

int ceil(double d) {
   return round(d+0.5);
}

int round(double d) {
   return floor(d+0.5)
}


oh wait, there's recur... nvm, carry on

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List