The Museum of HP Calculators

# Chebyshev Polynomial for the HP-65

This program is Copyright © 1974 by Hewlett-Packard and is used here by permission. This program was originally published in the HP-65 Math Pac 2.

This program is supplied without representation or warranty of any kind. Hewlett-Packard Company and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

 Chebyshev Polynomial Label Tn(x) Key A B C D E

## Overview

This program computes the value of the Chebyshev polynomial Tn(x) by using the recurrence equation

Tn+1(x) = 2xTn(x) - Tn-1(x)

where starting values are T0(x) = 1,  T1(x) = x and n is a nonnegative integer.

## Instructions

 Step Instructions Input Data/Units Keys Output Data/Units 1 Enter Program 2 n ENTER 3 x A Tn(x)

T3 (0.4) = -0.94

## The Program

``` CODE  KEYS
23  LBL
11  A
33 01  STO 1
02  2
33 02  STO 2
71  x
33 03  STO 3
44  CLX
35 07  g x<>y
35 22  g x<=y
01  1
24  RTN
01  1
33 04  STO 4
35 23  g x=y
34 01  RCL 1
24  RTN

23  LBL
01  1
44  CLX
34 03  RCL 3
34 01  RCL 1
71  x
34 04  RCL 4
35 00  g LST X
33 04  STO 4
35 08  g roll dn
51  -
33 01  STO 1
44  CLX
34 02  RCL 2
01  1
61  +
33 02  STO 2
35 22  g x<=y
22  GTO
01  1
34 01  RCL 1
24  RTN
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
35 01  g NOP
```

## Register Use

```R1  used
R2  used
R3  2x
R4  used
R5
R6
R7
R8
R9  used
```