Re: System of equations


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

Re: System of equations



Here's a "quick and dirty" way to approach this problem.

Set up a list of integers from 1 to 55, using seq( . Call it aa, say.
Then calculate lcm(aa,56-aa) and call it xx, say. Use the product ("pi")
operation to multiply together the numbers xx-180, and note that the
result is 0. Aha -- there _is_ a solution!  How to find it? You _could_
just visually scan through xx for 180, counting as you go, but...

The expression yy, formed as sign(xx-180+1/2) - sign(xx-180 -1/2),
should be 0 everywhere except where xx is equal to 180, and 2 at these
values. Try adding up the sign of the cumulative products of 2-yy to
find the value of a you are looking for.

Hmm, not too quick, and sure is dirty! Anyone have a better way without
setting up a formal loop?


        RWW Taylor
        National Technical Institute for the Deaf
        Rochester Institute of Technology
        Rochester NY 14623

        >>>> Always remember that you are unique, <<<<
                   >>>> just like everyone else.  <<<<

******************************************************************
* To UNSUBSCRIBE, send an email TO: listserv@lists.ppp.ti.com
* with a message (not the subject) that reads SIGNOFF CALC-TI
*
* Archives at http://peach.ease.lsoft.com/archives/calc-ti.html
******************************************************************