Hewlett Packard HP-10C/Hyperbolic Trig
From Wiki
Hyperbolic Trig Functions for HP-10C
sinh, cosh and tanh functions, bummed just enough to require the conversion of only two registers into program steps.
[edit] Usage
- Enter program listed below
- for sinh:
argument [R/S] - for cosh:
argument [GTO] [0] [6] [R/S] - for tanh:
argument [GTO] [1] [3] [R/S]
sinh and cosh require two stack levels, tanh requires 3. The program requires 23 steps including 9 base program steps and two converted data registers for 7 steps each. Registers R0 through R7 remain, leaving the user the desired statistics registers available, as well as two general-purpose registers.
[edit] Program Code
| Addr | Code | Instruction | Comment |
|---|---|---|---|
| sinh entry | |||
| 01 | 12 | ex | ex |
| 02 | 36 | ENTER | e-x |
| 03 | 15 | 1/x | |
| 04 | 30 | - | ex - e-x |
| 05 | 22 10 | GTO 10 | Branch to common denominator code |
| cosh entry | |||
| 06 | 12 | ex | ex |
| 07 | 36 | ENTER | e-x |
| 08 | 15 | 1/x | |
| 09 | 40 | + | ex + e-x |
| Common denominator code | |||
| 10 | 2 | 2 | (ex ∓ e-x) / 2 |
| 11 | 10 | ÷ | |
| 12 | 22 00 | GTO 00 | reset program counter and halt |
| tanh entry | |||
| 13 | 12 | ex | e2x |
| 14 | 42 11 | x2 | |
| 15 | 36 | ENTER | need e2x in numerator and denominator |
| 16 | 36 | ENTER | need manual stack lift |
| 17 | 1 | 1 | e2x - 1 numerator |
| 18 | 40 | - | |
| 19 | 34 | x↔y | Move numerator to Y register, work on denominator in X register |
| 20 | 1 | 1 | e2x + 1 denominator |
| 21 | 30 | + | |
| 22 | 10 | ÷ | (e2x - 1) / (e2x + 1) |
| 23 | 22 00 | GTO 00 | reset program counter and halt |
Back to Hewlett Packard HP-10C


