arctushar Posted November 2, 2008 Share Posted November 2, 2008 how to do upper/lower rounding in math example A number is 124.3 now I want get value 124 and 125 from this. is there any command? for that. clearly function(y.x) = y+1 function(y.x)=y what those functions are please help me Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 2, 2008 Share Posted November 2, 2008 You want ceil() (think of it as the ceiling, it is UP) and floor() (think of the floor, it is DOWN). Quote Link to comment Share on other sites More sharing options...
.josh Posted November 2, 2008 Share Posted November 2, 2008 I think instead of googling for a php help board and going through the trouble of registering so I could ask that sort of question (and then sitting around waiting for it to eventually be answered who knows when), I would have instead googled "php round up" and "php round down." Amazingly, someone else has already asked that question. Even more amazingly, lots of people have. Even more astoundingly amazing is that even the manual itself makes a guest appearance on the first page of the results. That's just crazy. X-Files crazy, even. To be fair though, I do admit I was thinking outside the box on that one, so I in no way whatsoever look down on you for not coming up with that game plan on your own. I certainly didn't. It must have been the aliens implanting thoughts into my head. Dammit, the one day I forget to wear my tinfoil hat.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.