[TIB] Re: Integral Variables...
[Prev][Next][Index][Thread]
[TIB] Re: Integral Variables...
It all depends on how you use it.. Remember that functions are evaluated
inside out. If you put anything inside the parentheses, it will be evaluated
first. However, you can put normal operations outside of the function and
they can be evaluated after the exact()
I suggested exact() as a means of stripping the decimal point from
approximate but integer values. In truth, I only use it when the decimal
point gets in the way of displaying the number.
Running exact() on floating point numbers will produce large fractions that
attempt to turn a real into a rational number. For this reason, I prefer to
avoid it unless it is necessary.
>
>Hmm... looks like a typo... anyway... will exact(make it an int before
>calc?
>----- Original Message -----
>From: "Tavis Segura" <tavis@hotmail.com>
>To: <ti-basic@lists.ticalc.org>
>Sent: Wednesday, April 09, 2003 1:16 PM
>Subject: [TIB] Re: Integral Variables...
>
> > >To [Tavis]: I'm only using the basic arithmatic operators,
> > >so I don't really have a worry about wandering outside J.
> >
> > It is true, but I'm sure anyone reading the archives might
> > have other ideas whenever they read these, so that point
> > needed to be addressed anyway.
> >
> > Going slightly off topic, I want to remind people my name is
> > spelled Tavis, and is pronounced with a long "a", as in "tape".
> > Spelling may not seem important when talking directly, but it
> > can be a big deal if anyone tries to contact me outside of
> > this list.
> >
> > >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.
> >
> > Sure thing! Maybe you should time the instructions for int, exact,
> > and exact(int()) while you're at it. It might help people determine
> > whether their algorithms will perform better with approximate versus
> > exact answers.
> >
> > On a side note about performance, I recently modified some
> > functions in Aim to use less precision in order to gain speed,
> > such as simplifying expressions containing pi to numeric values
> > when very few significant digits are needed. Such was done in
> > the terrain generator, where only whole number accuracy affected
> > the visible height of the terrain.
> >
> > >On that note, use subMat()! What a wonderful function when
> > >dealing with data in matrices.
> > >
> >
> > I just might try that sometime soon... I need to reorganize my
> > data before I can take advantage of that function, though.
> > Tavis
> >
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963