POLY 3.1

  By Søren Rom - 20 Feb. 2000
  sr@bkm.dtu.dk
  http://www.gbar.dtu.dk/~p970111/hp48.html


Info

  The library is a polynomial library for the HP48G/GX.

  Library Number: 1685
  Size: 2397 bytes
  Checksum: # 330Bh [# 13067d]


Installing the library

  1. Transfer the library (poly.lib) to your HP48G/GX.
  2. Recall the library to the stack.
  3. Purge the poly.lib variable.
  4. Enter the port number you want to store the library into and press STO.
  5. Turn the calculator off and then on again.


Usages

  A polynomial is represented in form of an array of coefficients.
  Both real and complex numbers is accepted as coefficients.
  Example:
  The polynomial '5*X^3-12*X+7' is represented as [ 5 0 -12 7 ].


  The library contains the following commands:

  PADD
    Adds two polynomials.
    Input
    2: [poly coef]
    1: [poly coef]
    Output
    1: [poly coef]

  PSUB
    Subtracts two polynomials.
    Input
    2: [poly coef]
    1: [poly coef]
    Output
    1: [poly coef]

  PMUL
    Multiplies two polynomials.
    Input
    2: [poly coef]
    1: [poly coef]
    Output
    1: [poly coef]

  PDIV
    Divides two polynomials.
    Input
    2: [poly coef]
    1: [poly coef]
    Output
    2: [poly coef] (remainder)
    1: [poly coef] (result)

  PPOW
    Integer power of a polynomial.
    Input
    2: [poly coef]
    1: real number
    Output
    1: [poly coef]

  PDER
    Derivative of a polynomial.
    Input
    1: [poly coef]
    Output
    1: [poly coef]

  PINT
    Primitive of a polynomial.
    Input
    1: [poly coef]
    Output
    1: [poly coef]

  PROOT2
    Calculate the roots of a polynomial.
    Input
    1: [poly coef]
    Output
    1: [poly roots]

  PEVAL2
    Evaluates a polynomial.
    Input                           Input
    2: [poly coef]                  2: [poly coef]
    1: real/complex number          1: 'symbolic'
    Output                          Output
    1: real/complex number          1: 'symbolic expression'

  PCOEF2
    Calculate the coefficients of a polynomial given it's roots.
    Input
    1: [poly roots]
    Output
    1: [poly coef]

  A->P
    Calculate the Taylor polynomial of an expression.
    (internal version of the TAYLR command)
    Input
    3: 'symbolic expression'
    2: 'variable'
    1: real number (polynomial order)
    Output
    1: [poly coef]

  PFIT
    Polynomial curve fit of desired order to a collection of data points.
    Input
    2: [[x1 y1][x2 y2]...[xN yN]] (N×2 matrix)
    1: real number (polynomial order)
    Output
    1: [poly coef]


Removing the library

  1. Enter the port ID in the form :PORT:1685 and press ENTER twice.
     PORT is the port number where you installed the library.
  2. Press the DETACH button (left-shift-library menu).
  3. Press the PURGE key.


Have fun:-)