[comp.sys.handhelds] divide polynoms on HP28s

LOZAN@TAUNOS.BITNET (Eliel Louzoun) (02/07/90)

Hello net
 Here is a little program I wrote that divide two polynoms.The program receive
two vectors of coefficent and return a vector with the division result and
another one with the reminder .I also include a program that transform a
coefficent vector to a polynom.


div [D3C4]  ; This is the main program but all the work is done by DIVV
  << DUP SIZE ! GET -> a b c
      << a b WHILE OVER SIZE
         1 GET c REPEAT DIVV EDD
         DROP -> e
           << a SIZE 1 GET c 1 - -
              ->LIST ->ARRY  e
            >>
      >>
   >>

DIVV [3075] ; This program is used by the previous one
<< DUP 1 GET -> a b c
    << a 1 GET c / DUP b * a SIZE RDM a
       SWAP - ARRY-> 1 GETI 1 - PUT
       ->ARRY SWAP DROP b
    >>
>>

poly [B9C2] ; This program expect a vector and a algebraic object
            ; and return a polynom in this object.
<<  -> a x
      << a SIZE 1 GET -> c
         << 0 0 c 1 - FOR j
             x j ^ a c j - GET * +
             NEXT
         >>
      >>
>>

B.T.W can anyone tell me how  to send programs to the HP28 server
without having FTP access ?
Thats all for today.
Bye

Eliel Louzoun
Jerusalem
Israel .