Question about Greatest Integer Step Functions

281 views
Skip to first unread message

Ross

unread,
Sep 29, 2009, 3:54:54 PM9/29/09
to tinspire
I know that you can graph a greatest integer step function with the
equation int(x). However, I want an easy way to have all numbers
round up instead of down. My current solution is to use int(x+(fPart
(x)>0)) on the TI84 and int(x+when(fPart>0,1,0)) on the TI-Nspire. Is
there just one function to do that, or do I need to continue using my
longer method.

Andy Kemp

unread,
Sep 29, 2009, 3:56:38 PM9/29/09
to tins...@googlegroups.com
If I understand you correctly you just want the ceiling() function...

Nelson Sousa

unread,
Sep 29, 2009, 6:54:08 PM9/29/09
to tins...@googlegroups.com
on a side note, you can also use floor(x) instead of int(x).

Nelson

Ross

unread,
Sep 29, 2009, 9:17:37 PM9/29/09
to tinspire
Thanks, Andy. I can't believe I didn't think of that for the Nspire,
but that function isn't on the TI-84, which is what my math class
uses, so is there a function like that on the TI-84?

On 29 Sep, 18:54, Nelson Sousa <nso...@gmail.com> wrote:
> on a side note, you can also use floor(x) instead of int(x).
>
> Nelson
>
>
>
> On Tue, Sep 29, 2009 at 20:56, Andy Kemp <a...@1kemp.co.uk> wrote:
> > If I understand you correctly you just want the ceiling() function...
>

Marc Garneau

unread,
Sep 30, 2009, 1:32:06 AM9/30/09
to tins...@googlegroups.com
Actually fPart of a negative number returns a negative number, so the
longer methods in the original message won't give the ceiling value
for negatives unless the fPart(x) is replaced with fPart(abs(x)).

As for a built-in ceiling function on the 84, the answer is no. There
are other methods to accomplish it besides int(x+(fPart(abs(x))>0)),
but they still lack simplicity. For example, abs(x)/x*int(abs(x)).

Marc Garneau

Nelson Sousa

unread,
Sep 30, 2009, 5:45:18 AM9/30/09
to tins...@googlegroups.com
you can define ceiling as when(ipart(x)=0,x,int(x)+1).

On the 84 Plus, assuming the number you want is in variable x, you can
simply do it like this:

int(x)+1 --> c
if fpart(x) = 0
c-1 --> c
disp c

Remark: I don't remember if int and fpart have parenthesis or not on
the 84 Plus.


There's no ceiling function on the 84+. There are ceiling and floor
functions on the 89s, 92s and Voyage 200.


Cheers,
Nelson

Ross

unread,
Sep 30, 2009, 3:25:08 PM9/30/09
to tinspire
Thanks, Nelson, but I should have made it clearer that I need a way to
graph this as well, so that program won't work.

Nelson Sousa

unread,
Sep 30, 2009, 3:39:02 PM9/30/09
to tins...@googlegroups.com
in that case the best way to define it on the 84+ is the one you're
currently using.

Nelson
Reply all
Reply to author
Forward
0 new messages