Re: A85: Re: even + odd functions


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

Re: A85: Re: even + odd functions



Robby Gutmann wrote:

> At 10:30 PM 9/3/97 -0400, you wrote:
> >
> >
> >-----Original Message-----
> >From: Robby Gutmann <gutmann@planet-connect.com>
> >To: assembly-85@lists.ticalc.org <assembly-85@lists.ticalc.org>
> >Date: Wednesday, September 03, 1997 8:32 PM
> >Subject: A85: even + odd functions
> >
> >
> >
> >>For some reason my math teacher is having this major Algebra
> nostalgia
> >>thing, and i was wondering if anyone out there has a program,
> assembly or
> >>BASIC, that found if a function is even or odd; on some of those big
> ones,
> >>it's a pain to go through and do the f(-x) test.  Or if anyone could
> give
> >me
> >>some quick hints on how i might go about programming one (BASIC
> please, i
> >>don't know assembly), that would be cool, too.
> >
> >
> >Just graph the function and see if it is symmetric about the y axis.
> If
> >so.. it is even.  If it is symmetric about the y=x axis, it is od...
> Much
> >simpler than writing a prg.
> >
> >Rob Isaacs
> >
> >
>
> Thanx for the advice, but like most math teachers, she's big on
> "showing
> your work."  With a program, you can show the steps.
>
> Robby Gutmann
>
> gutmann@planet-connect.com

Oh, cruelty... I really hate to get into basic on an assembly list, but
here's how I'd go about doing this... (The following message does not
contain (much) code, and is only hypothetical, hasn't been tested at
all)

Well, first I'd input the string of the eqn, then duplicate the string,
and use all those nasty routines in the STRING menu to replace all the
x's with (-x)l... Then I'd run it through solver using a couple of
numbers ie testing 1,-1,0, and a few randoms... This routine isn't
guaranteed to work 100% of the time, cause it doesn't check everything,
but it'll be correct a good portion of it... Now have fun writing it...
=]... Good luck!

Adam Schwarcz

ICQ2372556



References: