# HP Forums

Full Version: (42S) Quickie RPN Routines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
http://edspi31415.blogspot.com/2019/04/q...ee-42.html

X, Y refer to their respective stacks and their values

1 + 1 /( 3^(2*X)) + 1/(5^(2*X))

Routine A:
(Labels are omitted for these exercises)

2
*
ENTER
ENTER
3
X <> Y
Y ↑X
1 / X
X <> Y
5
X <> Y
Y ↑ X
1 / X
+
1
+
END

Routine B:

2
*
+ / -
3
X <> Y
Y ↑ X
LAST X
5
X <> Y
Y ↑ X
+
1
+
END

Examples:
X: 2.0000, Result: 1.0139
X: 3.1666, Result: 1.0010

(X + Y)*(X^2 + Y^2)

Routine A:

ENTER
X ↑ 2
R ↓
X <> Y
+
LAST X
X ↑ 2
R ↑
+
*
END

Routine B:

STO ST Z
X ↑ 2
X <> Y
STO + ST Z
X ↑ 2
+
*
END

Examples:
X: 4.0000, Y: 3.0000, Result: 175.0000
X: 2.7000, Y: 3.6000, Result: 127.5750

√(1 + X^2) / √(1 - X^2)

Routine A:

X ↑ 2
1
X <> Y
-
LAST X
1
+
X <> Y
÷
SQRT
END

Routine B:

X ↑ 2
ENTER
ENTER
1
STO + ST Z
STO - ST Y
R ↓
+ / -
÷
SQRT
END

Examples:
X: 0.5556, Result: 1.3759
X: 0.7278, Result: 1.8035

X / √(X^2 + Y^2)

Routine:

X ↑ 2
X <> Y
STO ST Z
X ↑ 2
+
SQRT
÷
END

Examples:
X: 0.5000, Y: 0.7500, Result: 0.5547
X: 1.8080, Y: 1.0220, Result: 0.8705

(X + Y) / (X * Y)

Routine A:

STO ST Z
X <> Y
STO + ST Z
*
÷
END

Routine B:

ENTER
R ↓
X <> Y
+
LAST X
R ↑
*
÷
END

Examples:
X: 5.0000, Y: 4.0000, Result: 0.4500
X: 2.9505, Y: 3.8181, Result: 0.6008

X^Y + Y^X

Routine A:

ENTER
R ↓
X <> Y
Y ↑ X
LAST X
R ↑
Y ↑ X
+
END

Routine B:

ENTER
R ↓
X <> Y
Y ↑ X
LAST X
R ↑
Y ↑ X
+
END

Examples:
X: 3.9050, Y: 2.7006, Result: 88.0041
X: 4.2650, Y: 4.8750, Result: 2036.6461
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :