(12C) Circles, Spheres, and Right Triangle
|
10-03-2016, 01:03 AM
Post: #1
|
|||
|
|||
(12C) Circles, Spheres, and Right Triangle
Approximating π
The HP-12C does not have a π key. We can tackle this in one of two ways: * We can input the full approximation of π until the display no longer accepts numbers, which is up to 10 numbers. π typed to screen capacity is 3.141592654. Since each digit entered plus the decimal point takes a step, it will require 11 steps to enter. * We can use the approximation π ≈ 355/113. 355/113 ≈ 3.141592920. 355/113 is an accurate approximation of π to 6 digits. It will take a total of 8 steps to enter this approximation. Since most of the time the HP 12C is used at Fix 2 mode (2 decimal places), this may be for most practical purposes an adequate approximation. Just a caution: make number of calculations low and the factors should be relatively small. The programs represented on this blog will use the 355/113 to save space. If you require a better approximation of π and have the space, feel free to replace 355/113 with the 3.141592654. HP 12C: Circles – Circumference and Area The program calculates an approximate circumference and area of a circle given radius r. C = 2*π*r A = π*r^2 Here, we take 355/113 as an approximation for π. Code: STEP CODE KEY Registers used: R0 = r, R1 = 335/113 ≈ π Input: Enter radius, r, and press [R/S]. Output: Obtain the approximate circumference. Press [R/S] for the area. Examples (FIX 2): Radius = 2.96. Results: Circumference ≈ 18.60, Area ≈ 27.53 Radius = 5.00 Results: Circumference ≈ 31.42, Area ≈ 78.54 Alternate: This uses the following shortcuts: Number, [ENTER], [ + ] doubles the number. Number, [ENTER], [ * ] squares the number. That and the use of LST X reduces the number of steps to 19 and only uses one register, R0. Code: STEP CODE KEY Fun fact: A circle of radius 2 will have the same circumference and area, approximately 12.56637. HP 12C: Sphere – Surface Area and Volume This program calculates the surface area and volume of a sphere give the radius r. Again we take 355/113 as an approximation for π. The well-known formulas: S = 4*π*r^2 V = 4/3*π*r^3 = S * r/3 Code: STEP CODE KEY Registers used: R0 = r Input: Enter radius, r, and press [R/S]. Output: Obtain the approximate surface area. Press [R/S] for the volume. Examples: Radius = 2. Surface area ≈ 50.27, Volume ≈ 33.51 Radius = 8.64. Surface area ≈ 938.07, Volume ≈ 2701.65 Fun fact: A sphere of radius 3 will have the same surface area and volume, at approximately 113.09734. HP 12C: Right Triangles – Area, Hypotenuse, and Grade given Rise and Run Let y be the rise (height) and x be the run (length) of a right triangle. Then: Area = 1/2 * x * y Hypotenuse = √(x^2 + y^2) Grade = y/x * 100% (like slope) Code: STEP CODE KEY Registers Used: R0 = rise (y), R1 = run (x) Input: rise [ENTER] run [R/S], height [ENTER] length [R/S] Output: area of a triangle [R/S], hypotenuse [R/S], grade Example: rise = 430, run = 1600 Input: 430 [ENTER] 1600 [R/S] Results: Area: 344000, Hypotenuse: 1656.77, Grade: 26.88 (%) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)