|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
Returns the ceiling of a number.
ceiling(value)
Menu Location
- Press 2nd MATH to enter the MATH popup menu.
- Press 1 to enter the Number submenu.
- Press 7 to select ceiling(.
This command works on all calculators.
1 byte
The ceiling() command rounds a number up to the nearest integer at least as large as the number. For instance, ceiling(π) returns 4, while ceiling(-π) returns -3.
There are several commands available to round a number to an integer in slightly different ways:
- int() and floor() — like ceiling(), but round down instead.
- iPart() — truncates a number to just its integer part (or, if you prefer, rounds a number toward 0).
- round() — rounds to a specific place value, not just to an integer, but round(x,0) will round x to the nearest integer, up or down.
ceiling() can also be applied to complex numbers, lists, and matrices, rounding everything that there is to round in each of them.
:ceiling(3)
3
:ceiling({-π,π})
{-3 4}