Sunday, May 11, 2014

Scientific Keyboard Challenge, Revisited

On this post:

http://edspi31415.blogspot.com/2014/05/scientific-calculator-keyboard-challenge.html,

I have issued a creativity challenge: design a scientific calculator using only 25 keys.  No restrictions.  I came up with a couple ideas.

Before I present mine, I want to show a great landscape design by Picky Bart.  Thanks for posting PickyBart!:

http://pickyb.blogspot.co.uk/2014/05/proposed-scientific-rpn-hp-quickcalc.html

---------------------

The first one is an RPN keystroke programmable calculator:



The next one is a graphing calculator. (or at least an attempt at one).  Since only 25 keys are allowed, this prevents the use of an ALPHA key.  So, soft keyboards via dialogue had to be implemented instead.



Modes:
RPN/Linear/Math IO
DEG/RAD/GRAD
FUNC/POLAR/PARAM/SEQN
a+bi, r<q, REALS
BIN/OCT/DEC/HEX
Language (dialogue bar)
Data:  Edit, Name, Delete
Stat: n, Means, Sums
Dist:  Norm PDF, Norm CDF; iNorm, Bin PDF, Bin CDF, Pois PDF
Pois CDF, Chi PDF; Chi CDF, iChi
List:  { }, sum, average, prod; seq, sorta, sortd, augment;
Dchg, size, position
Regr:  Vars (a, b, c, r), Regr (Lin, Log, Exp, Pwr, Inv, Quad, Cubic,
Sine)
Matrix:  [ ], det, trans, eigen; eigvect, size, position, ref; 
rref, spec radius, rank, trace; LQ, LSQ, LU, QR
Prog:
File:  New, Edit, Delete
Input:  " ", Input, Prompt, Menu
Output:  Clear, Display, Output, Graph
Tests:  ==, >< , >, >=; <, <=, and, or
IFTE:  If, Then, Else, EndIf
Loop:  For, Step, Next; Repeat, Until, While, Wend
Ctrl:  Pause, Stop, Error, Subr
String:  length, sub, left, right; >expr, >string, position, augment
Math:
Frac:  PDQ, a b/c, exact, approx
Hyp:  (hyperbolic)
Prob: x!, nCr, nPr, gamma; rand, randint, randnorm, dice
Cmplx: abs, arg, real, imag; >Polar, >Rect
Parts: IP, FP, round
Calc:  derivative, integral, S, P 
Constants: (24)
Conversions: (12 pairs)
Base:  
Mark: b, o, h, d
HEX: A, B, C, D; E, F
Logic: and, or, not, xor; xnor, shift right, shift left, 2's
Utility:
RPN: swap, roll down, roll up, drop; over, pick, view, dupn
Solver: New, Edit, Delete, Solve
ALPHA: - enter message and press enter
CAPS (Keyboard), lower (keyboard), Symb (! @ # $ % ^ & * ( ) { } and math symbols), Greek 

I may have forgot something but I think I got all the basics covered.
 
This post is property of Edward Shore  - 2014
 
 
 
 


Casio fx-3650p: Programming

HAPPY MOTHER'S DAY! Love you Mom! Thanks for all you do - Eddie

Casio fx- 3650p Programs

To celebrate the recent procurement of a Casio fx-5800p, let's dedicate the next several posts to Casio programming calculators. This one is for the fx-3650p, a programming calculator sold world wide (not so much the United States :( ).

Some pointers about the fx-3650p:

* The fx-3650P has only 7 variables (A, B, C, D, X, Y, and M). To save space, variables are recycled.

* You can apply storage arithmetic to memory M, mainly M+ and M-. On the fx-3650P, M+ and M- can be programmable steps. I am not sure if this is possible on programming models (fx-50f, fx-4500p, etc), but this option is not present in Casio's fx-5800p and current graphing calculators (fx-9860, Prizm, etc).

* With Goto and Label, loops can be constructed. The fx-3650p has four comparative tests (=, ≠, >, and ≥).

* Take advantage of not having to close the final parenthesis and begin able to use implicit multiplication to save space.

With that, here are some programs.

Contents:
1. Circular Sectors
2. Stopping Sight Distance
3. Resistors in Parallel
4. Net Present Value
5. Rod Pendulum
6. Vectors: Dot and Cross Products

Circular Sector

Input:
A = radius
B = angle in degrees

Formulas:
arc length = 2 * r * sin(θ*π/360)
chord length = (r * θ * π)/180

Program: (28 steps)
? → A : ? → B : Deg :
2 A sin ( B π ÷ 360 ◢ A B π ÷ 180


Example:
A = 3.6
B = 44°

Input: Prog # 3.6 EXE 44 EXE

#: 1, 2, 3, or 4, depending on where your program is stored.

Results (to four decimal points);
0.04825 (chord length) EXE
2.7646 (arc length)

Stoping Sight Distance (U.S. Units)

Input:
A = design vehicle speed in miles/hour
B = grade, as a percentage

Standard constants (acceleration of the car of 11.2 ft/s^2 and 2.5 seconds of reaction time) are used.

Source: Goswami, Indramil Ph.D. P.E. "All In One Civil Engineering PE Breadth and Depth Exam Guide" 2nd Edition. McGraw Hill: 2012

Formula:
SSD = 11/3 * v + (1.075*v^2)/(11.2 + .32G)

Program: (32 steps)
? → A : ? → B :
11 A ⌟ 3 + 1.075 A ² ⌟ ( 11.2 + .32 B


Example 1: 50 mph, grade of 0%
Input: Prog # 50 EXE 0 EXE
Result: 423.4 mph

Example 2: 65 mph, grade of -2%
Input: Prog # 65 EXE -2 EXE
Result: 668.8 mph

The next two programs make use of loops.

Total Resistance: Resistors in Parallel

Formula: (1/R1 + 1/R2 + 1/R3 + ... )⁻¹

Note: The fx-3650P allows us to take the M+ to our advantage. Enter each resistor in Ohms. When completed, enter 0 to exit the loop.

Program: (30 steps)
0 → M :
Lbl 0 : ? → A : A = 0 ⇒ Goto 1 :
A ⁻¹ M+ : Goto 0 :
Lbl 1 : M ⁻¹


Example: A circuit has three resistors in parallel of 4 Ω, 3. Ω, and 6 Ω.
Input: Prog # 4 EXE 3 EXE 6 EXE 0 EXE
Result: 1.33333333

Net Present Value

Formulas: Σ (A_M / (1 + B%)^M) for M = 0 to C

Variables:
A = cash flows
B = periodic interest rate
C = number of cash flow (entered in advance)

Calculated Variables:
M = counter
D = total

Program: (51 steps)
? → C : ? → B : 0 → M : 0 → D :
Lbl 0 : ? → A :
D + A ÷ ( 1 + .01 B ) ^ M → D : 1 M+ :
C ≥ M ⇒ Goto 0 : D


Example:
Cash Flow:
CF0 = -$1,000.00
CF1 = $0.00
CF2 = $500.00
CF3 = $750.00
CF4 = $1,000.00
Periodic Interest Rate = 10%
Number of Flows = 4 (don't count the initial flow)

Input:
Prog #
4 EXE (number of flows)
10 EXE (periodic Interest rate)
-1000 EXE (cash flows)
0 EXE
500 EXE
750 EXE
1000 EXE

Results: $659.72 (NPV)

Pendulum of the Rod (U.S. units)

(See the above diagram).
A = length of rod
D = length of the board holding the rod

Formulas:
T = 2 π √( I / (m*g*A))
I = inertia of the pendulum
m = mass of the object
g = gravity constant (9.80665 m/s^2, 32.174 ft/s^2)

Using the rod, where I = 1/3 * m * r^2,
T = 2 * π * √(A/96.522) (US units) or
T = 2 * π * √(A/29.41995) (SI units)

Average velocity: V = D/T

Source: Michael Browne, Ph.D. "Schaum's Outlines: Physics for Engineering and Science" 2nd Edition. McGraw Hill, 2010

Program: (24 bytes for US Units)
? → A : ? → D :
2 π √ ( A ÷ 96.522 ◢ D ÷ Ans


Example:
A = 6 ft., D = 1.4 ft
Input: Prog # 6 EXE 1.4 EXE
Results:
1.566543062 sec (T) EXE
0.89368753 ft/sec (V)

Vectors: Dot and Cross Products

Formulas:
Dot Product:
[A, B, C] • [D, X, Y] = A*D + B*X + C*Y
[A, B, C] × [D, X, Y] = [ B*Y-C*X, C*D-A*Y, A*X-B*D ]

Program: (50 bytes)
? → A : ? → B : ? → C :
? → D : ? → X : ? → Y :
A D + B X + C Y ◢
B Y - C X ◢
C D - A Y ◢
A X - B D


Example:
[ 3, 4, 6 ] • [ -1, 2, 3 ] = 23
[ 3, 4, 6 ] × [ -1, 2, 3 ] = [ 0, -15, 10 ]

Input:
Prog # EXE 3 EXE 4 EXE 6 EXE -1 EXE 2 EXE 3 EXE

Results:
23 (dot product) EXE
0 (cross product, x) EXE
-15 (cross product, y) EXE
10 (cross product, z)

Hope that you enjoy these programs, maybe got a few pointers. Have a great day. I will be working with the Casio fx-5800p for my next blog, which I target to put out next week.

Peace!

Eddie


This blog is property of Edward Shore. 2014

Tuesday, May 6, 2014

Video: Unboxing the Casio fx-5800p (Updated 5/11/2014)

Unboxing the Casio fx-5800p. My cat Spike makes an appearance. Enjoy! Eddie


https://www.youtube.com/watch?v=zRdIk48dUPQ
Update 5/11/2014:  My apologizes - I had to edit a video and reload it.  The above link is correct.
Eddie

Monday, May 5, 2014

Complex Analysis Rap

Complex Analysis Rap

If you have a chance, check out this awesome complex analysis rap by Katherine Bellafiore Sanden:

http://youtu.be/PyYLzjYOHz0

You can download the song here: https://soundcloud.com/dragonflykbs/complex-analysis

Thank you Katherine for putting it on Soundcloud! The song is now proudly played on my iPod.

Thread where the rap, and other math sings are posted:

http://www.hpmuseum.org/forum/thread-1227.html

Thank you HP Forums (MoHPC)!

Just thought this is worth sharing - Eddie


Review: Canon F-792SGA Scientific Calculator

Here it is, a full in-depth review of the Canon Eco-Friendly F-792SGA calculator. For a hilarious intro video to the calculator, just click here:

http://youtu.be/F4QJZSLYLyk

Thanks Gina and Dad!

Quick Stats
Company: Canon
Price: The price ranges from $13 to $20.
Power: Solar, with battery backup (one CR2032 battery)
Where to Buy: Online. I am not aware of any stores in the United States (maybe Fry's?) that have them on sale. I got mine from amazon.com.
Package: Blister package. The calculator comes with two foldable manual sheets: one in English, the other in Spanish.
Special Note: The calculator's shell is made of recycled plastic.
Year Manufactured: first manufactured in 2013

Official web page from Canon: http://www.usa.canon.com/cusa/consumer/products/calculators/compact_calculators/f_792sga

At the time of this blog post, Canon does not offer an electronic version of the manual. Hopefully it will be uploaded soon.

Calculator Modes Offered
(First page)
1: COMP - Regular Calculator Mode
2: CMLX - Complex Number Mode
3: STAT - Statistics Mode
4: BASE - Base Calculations
5: EQN - Simultaneous Equations up to 4 x 4 systems, Quadratic, Cubic, and Quartic polynomial solver
6: TABLE - Function table of one variable
7: MATX - Matrices with operations for up to 4 x 4 matrices
8: VCTR - Vectors with operations for up to 3-element vectors
(Second Page)
1: INEQ - Inequality Solver
2: RATIO - Ratio Solver

General Math Mode

The F-792SGA allows for linear or textbook input and output. In textbook input, exact roots and multiples of π are displayed. Pressing the F-D key converts answers between exact and approximate.

Keyboard and the Apps Key

The keys are nice and responsive. Also, the keys stay in place when pressed and don't make slight shifts, giving the keyboard stability.

The keyboard is also nicely organized. The dedicated Apps button gives the user access to functions depending on the mode.

COMP: Π (product), Σ (sums), Max (of at least 2 numbers), Min (of at least 2 numbers), Q...r (quotient and remainder), Mod, LCM (of at least 2 integers), GCD (of at least 2 integers)

CMPLX: Polar and rectangular conversions, real part, imaginary part, conjugate, argument

STAT: ability to change regression type, edit data, regression variables, normal distribution area calculations

BASE: AND, OR, XOR, XNOR, NOT, NEG, base markers

EQN: change equation type

MATX: edit matrices, determinant, transpose, generate identity matrices, inverse of matrices (Inv), adjoint to matrices

VCTR: edit vectors, dot product. (Use × for cross product)

RATIO and INEQ: change type

Advanced Functions on the Keyboard

In COMP mode, you can calculate numerical derivatives of f(X), definite integrals of f(X), random numbers, and random integers (Press [Alpha], [ . ]).

Solving Equations in COMP Mode

To solve an equation, type in the equation, follow it with a comma (Press [Shift], [ ) ]). Then press [Shift], [CALC]. You can use the variables A through F, X, Y, and M.

38 Built In Formulas

Canon has a nice feature that is exclusive to the Canon scientific calculator line: that is the 38 built in formulas. On the F-792SGA, just press [Alpha], [ ( ]. Then scroll to get the formula desired, press the equals key. You are prompted for the variables and the result is returned.

For reference, I will have the 38 formulas listed at the end of this review after the Verdict section.

Complex Mode

The complex mode is a separate mode. The nice thing is that there are real and imag functions. Unfortunately, transcendental functions (powers, logs, trig) are not available with complex numbers.

Statistics Mode

You can turn the frequency column on and off. The F-792SGA can store up to 80 single points or 40 pairs. With the frequency column turned on, the number of slots are halved.

Regressions available are: Linear, Exponential (y = a*e^(b*x) and y = a*x^b), Power, Logarithmic, Inverse, and Quadratic (nice!)



F-792SGA vs. Other Scientific Calculators

The display and operating system of the Canon F-792SGA is practically the same of Casio's current Natural-V.P.A.M calculators (such as the fx-115ES PLUS). However, this is not a straight-knock off of the Casio counterpart.

Here are some differences:

* The F-792SGA has 79 scientific constants and 170 conversion pairs compared to the fx-115ES PLUS's 40 and 40, respectively. For further comparison purposes, the Sharp EL-W516X has 52 and 44, respectively. The nice thing about the F-792SGA is that you don't need to type a code to access the constants and conversions.

* The F-792SGA has a ratio solving mode, which I think is unique to this calculator (or to the Canon line?). This mode solves for X in two ratio statements: a:b=X:d and a:b=c:X. This is in place of the fx-115ES PLUS' verify mode.

* Up to 4 x 4 matrices can be used with the F-792SGA. This is on par with the Sharp EL-W516X. However, I like the matrix handling and operation on the F-792SGA better.

* The F-792SGA is one of the few solar scientific calculators to solve quartic equations, if not the only one.

* The F-792SGA has 19 memory registers: A-F, X, Y, M, and 0-9. The numeric storage registers are good for longer-term storage of constants. This is first calculator of this time to allow the use of numeric registers.

* The F-792SGA has 38 built in formulas, exclusive to Canon scientific calculators. This is referring to all non-graphing calculators.

Verdict

The Canon F-792SGA is a solid calculator and can rival the solar scientific calculators that are available. Again, you may not be able to find Canon calculators in most stores (that is unfortunate), so the most realistic way to get one is to order online (assuming it is available in your country).

I hope you enjoyed this review.

Eddie


List of Formulas included with the F-792SGA

1. Area of a Triangle: S = 1/2 * b * c * sin A

2. Area of a Circle: S = π * r^2

3. Fan-Shaped Area (Sector): S = 1/2 * r^2 * θ

4. Area of a Parallelogram: S = a * b * sin θ

5. Area of an Ellipse: S = π * a * b

6. Area of a Trapezoid: S = 1/2 * (a + b) * h

7. Surface Area-Sphere: S = 4 * π * r^2

8. Surface Area-Cylinder: S = 2 * π * r * (h + r)

9. Volume-Sphere: S = 4/3 * π * r^3

10. Volume-Cylinder: V = π * r^2 * h

11. Volume-Cone: V = 1/3 * π * r^2 * h

12. Sum-Arithmetic Progression: S = 1/2 * n * (2*a_0 + (n-1)*d))

13. Sum-Geometric Progression: S = a_0 * (r^n - 1)/(r - 1)

14. Σ(n^2) = 1/6 * n * (n + 1) * (2*n + 1)

15. Σ(n^3) = (1/2 * n * (n + 1))^2

16. Distance between two points: √((x_2 - x_1)^2 + (y_2 - y_1)^2)

17. Included angle between two lines: θ = atan((k_2 - k_1)/(1 + k_1 * k_2))

18. Law of Cosines-find side: a = √(b^2 + c^2 - 2*b*c*sin A)

19. Law of Sines-find side: a = 2 * r * sin A

20. Distance: d = v_0 * t + 1/2 * a * t^2

21. Velocity: v = v_0 + a * t

22. Circular Motion-Finding Period with velocity: T = 2 * π * r/v

23. Circular Motion-Finding Period with angular velocity: T = 2 * π/omega

24. Period of Simple Pendulum: T = 2 * π * √(l/g)

25. Electric Oscillation Frequency: f = 1/(2 * π * √(L * C))

26. Resistance: R = ρ * l/s

27. Joule's Theorem: P = V^2/R

28. Joule's Theorem: P = I^2 * R

29. Shunt Resistance: R = (R_1 * R_2)/(R_1 + R_2)

30. Kinetic Energy: E = 1/2 * m * v^2

31. Gravitational Potential Energy: E = m * g * h

32. Centrifugal Force: F = m * v^2/r

33. Centrifugal Force: F = m * omega^2 * r

34. Law of Gravity: F = G * M * m/r^2 (G = 6.6728*10^-11)

35. Electric Field Intensity: E = Q/(4 * π * epsilon * r^2)

36. Heron's Formula: S = √(Φ*(Φ-a)*(Φ-b)*(Φ-c)) where Φ=(a+b+c)/2. Only a,b, and c are asked for.

37. Optics-Reflective Index: E = sin I/sin r

38. Optics-Critical Angle-Total Reflection: θ = asin(n_2/n_1)

** g is assumed to be g = 9.80665 m/s^2. Use SI units.

Note: These formulas are included with most Canon scientific calculators, like the F-710. The notable exception is the F-604, where the formulas are not present.
Source: Canon F-792SGA Manual



This blog is property of Edward Shore. 2014

Sunday, May 4, 2014

Scientific Calculator Keyboard Challenge

Design the keyboard of a scientific calculator and post links to your designs as responses to this blog entry. Rules:

You have only 25 keys to work with. That's it.

Whatever features, applications, special functions, number of modification keys you can fit is up to you. It can be simple, graphing, financial and/or complex. This blog entry is just a call to be creative and to have some fun. Here is one I did:

It is a relatively simple scientific calculator design that would be either a solar-powered calculator or an app. Features include linear regression, algebraic and RPN entry modes, and basic scientific functions.

If you partake in this, have fun and please provide links as responses.

Coming soon I will review two calculators I recently purchased: the Canon F-792SGA and the Casio fx-5800P N.

Symmetric Quartic Equation - Python

Symmetric Quartic Equation - Python Note: The code is programmed with a TI-84 Evo. No modules are used, so the scripts should be adopt...