[TIB] Re: Integral Variables...


[Prev][Next][Index][Thread]

[TIB] Re: Integral Variables...



To Travis: I'm only using the basic arithmatic operators, so I don't really
have a worry about wandering outside J.

To Robert: Speed was, indeed, the original point.  And, believe me, if it
makes -any- difference at all, I'll be willing to use it.  There are hundred
of computations being forced through the processor...any difference at all
would be wonderful.

And, bah, I have VTI sitting right here.  I'll go test it right now...or
not.  VTI won't let me leave the timer functions enabled.

Ah, well.  I'll let everyone know the speed increase (even if it is only 2%
or something) when I get back.  Keep a record of all this when the next kid
wants to use it.

On that note, use subMat()!  What a wonderful function when dealing with
data in matrices.

----- Original Message -----
From: "Tavis Segura" <tavis@hotmail.com>
To: <ti-basic@lists.ticalc.org>
Sent: Wednesday, April 09, 2003 12:00 AM
Subject: [TIB] Re: Integral Variables...


> Hard to say.. I'd have to look at the function list of the manual. I'd
have
> to say the regular plus, minus, and asterisk should work just fine, since
> they don't produce approximate numbers when given exact ones. The division
> symbol could be replaced with IntDiv() and mod() as needed.. and those
> functions should hold up just fine even if the data is in a matrix or
list.
>
> If you really want to avoid non-integer results I'd say avoid functions
that
> end up with complicated or approximate results (like sin, ln, etc..)if you
> want to stay in integer math. The act of turning stuff to approximations
and
> back to integers would only make things slower than keeping them as
> approximations, so if you plan to use them, I'd say just use them and
don't
> worry about converting back until you think you're done with them.
>
> Tavis
>
> >
> >(blinks)
> >
> >Will exact(int(x)) seriously work?
> >
> >I must test this.  Tomorrow, school, startTmr().  Or whatever that
function
> >is.
> >
> >Woo for the new features.  Is there a certain operation that I should run
> >to use the arithmatic functions for the ints?  Like 2+1=3, all ints?
> >(Someone mentioned an intDiv() earlier...)
> >
>
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>




References: