The Museum of HP Calculators

# Trigonometric Functions for the HP-38C

This program is by Gerson Washiski Barbosa and is used here by permission.

This program is supplied without representation or warranty of any kind. Gerson Washiski Barbosa 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.

## Overview

This program computes all common trigonometric functions and their inverses (first quadrant only).

Angular mode: Degrees

```    Accuracy:  SIN,  COS,  TAN: mostly 9 significant figures;

ASIN, ACOS, ATAN: mostly 7 significant figures.
```
Running time: around 4 seconds, argument independent.

Usage:

``` COS(x): [R/S]
SIN(x): [R/S] [x<>y]
TAN(x): [R/S] [/]
ASIN(x): [g] [GTO] 39 [R/S]
ACOS(x): [g] [GTO] 46 [R/S]
ATAN(x): [g] [GTO] 52 [R/S]
```
Before using the program, store the following data:

```	   1.745329252E-02  STO 0
-3.333324820E-01  STO 1
1.998722722E-01  STO 2
-1.397054038E-01  STO 3
-8.860960894E-07  STO 4
1.349561365E-11  STO 5
-9.716369450E-17  STO 6
```

Tip: Use RCL 0 (pi/180) to convert degrees to radians and vice-versa.

The program should work on the 38E as well, however keying in this over and over again would by no means be so practical.

For more details, refer to article #487

## Listing

```Keystrokes      |Display       |
[g][P/R]        |              |
[f]CLEAR[PRGM]  |00-           |
3               |01-         3 |
[/]             |02-        71 |
[STO][n]        |03-    21  11 |
[ENTER]         |04-        31 |
[x]             |05-        61 |
[ENTER]         |06-        31 |
[ENTER]         |07-        31 |
[ENTER]         |08-        31 |
[RCL]6          |09-    22   6 |
[x]             |10-        61 |
[RCL]5          |11-    22   5 |
[+]             |12-        51 |
[x]             |13-        61 |
[RCL]4          |14-    22   4 |
[+]             |15-        51 |
[x]             |16-        61 |
[RCL]0          |17-    22   0 |
[+]             |18-        51 |
[RCL][n]        |19-    22  11 |
[x]             |20-        61 |
[ENTER]         |21-        31 |
[ENTER]         |22-        31 |
[x]             |23-        61 |
4               |24-         4 |
[x]             |25-        61 |
[CHS]           |26-        32 |
3               |27-         3 |
[+]             |28-        51 |
[x]             |29-        61 |
[ENTER]         |30-        31 |
[ENTER]         |31-        31 |
[ENTER]         |32-        31 |
[x]             |33-        61 |
[CHS]           |34-        32 |
1               |35-         1 |
[+]             |36-        51 |
[f][SQRT]       |37-    24  21 |
[g][GTO]00      |38- 25  7  00 |
[ENTER]         |39-        31 |
[x]             |40-        61 |
[f][1/x]        |41-    24  71 |
1               |42-         1 |
[-]             |43-        41 |
[f][1/x]        |44-    24  71 |
[g][GTO]51      |45- 25  7  51 |
[ENTER]         |46-        31 |
[x]             |47-        61 |
[f][1/x]        |48-    24  71 |
1               |49-         1 |
[-]             |50-        41 |
[f][SQRT]       |51-    24  21 |
[g][x=0]        |52-    25   6 |
[g][GTO]00      |53- 25  7  00 |
1               |54-         1 |
[x<>y]          |55-        33 |
[g][x<=y]       |56-    25   5 |
[g][GTO]60      |57- 25  7  60 |
[f][1/x]        |58-    24  71 |
9               |59-         9 |
0               |60-         0 |
[STO][FV]       |61-    21  15 |
[g][Rv]         |62-    25  33 |
[f][1/x]        |63-    24  71 |
[STO][n]        |64-    21  11 |
[ENTER]         |65-        31 |
[x]             |66-        61 |
[+]             |67-        51 |
[f][SQRT]       |68-    24  21 |
[RCL][n]        |69-    22  11 |
[-]             |70-        41 |
[STO][n]        |71-    21  11 |
[ENTER]         |72-        31 |
[x]             |73-        61 |
[ENTER]         |74-        31 |
[ENTER]         |75-        31 |
[g][12/]        |76-    25  12 |
[ENTER]         |77-        31 |
[RCL]3          |78-    22   3 |
[+]             |79-        51 |
[x]             |80-        61 |
[RCL]2          |81-    22   2 |
[+]             |82-        51 |
[x]             |83-        61 |
[RCL]1          |84-    22   1 |
[+]             |85-        51 |
[x]             |86-        61 |
1               |87-         1 |
[+]             |88-        51 |
[RCL][n]        |89-    22  11 |
[x]             |90-        61 |
2               |91-         2 |
[x]             |92-        61 |
[RCL]0          |93-    22   0 |
[/]             |94-        71 |
[RCL][FV]       |95-    22  15 |
[g][x=0]        |96-    25   6 |
[x<>y]          |97-        33 |
[x<>y]          |98-        33 |
[-]             |99-        41 |
[f][P/R]        |              |
```