Showing posts with label fx-9860g. Show all posts
Showing posts with label fx-9860g. Show all posts

Sunday, March 17, 2024

Casio fx-9750GIII and fx-CG 50: Playing Games with the Probability Simulation Mode

Casio fx-9750GIII and fx-CG 50: Playing Games with the Probability Simulation Mode






The Probability Simulation add-in has six types of probability simulations:

* Coin Toss

* Dice Roll

* Spinner

* Marble Grab

* Card Draw

* Random Numbers


The add-in application is available for the following calculators:

* Casio fx-9750GIII and fx-9860GIII (and Graph 75/85/95 series, Graph 35+ E II)

* Casio fx-CG 10/20 and fx-CG 50 (and Graph 90+E)

* Casio fx-9860G


I believe on the fx-9750GIII and fx-9860GIII, the Probability Simulation Add-In is available out of the box. For others, the add-in can be downloaded through Casio’s Worldwide Education Website: https://edu.casio.com/download/index.php.


Let’s look at three ways we can use the Probability Simulation add-in in games of chance. This is a great app when you don’t have a pair of dice, playing cards, or a bag of marbles around.


In the Set Up menu, there is an option for seed from 1 to 99999.


Screen shots are from the fx-CG 50.


Interaction with Other Modes


* Data can be stored into global lists 1-26. Lists in these Casio calculators contain only numerical information. Numerical codes are used for card suits and face cards.


* There are no commands from the Add-In that can be used in programming. The simulation is mean to be a stand-alone app.




Drawing a Poker Hand






From the main screen, press F5 for Card Draw. To simulate poker, go into set up by pressing [SHIFT] {SET UP}. We can set either a 52 playing card deck, which is the standard deck without Jokers, or a reduced deck of 32 cards (sevens through Aces only). We don’t want Replacement, so turn that off. Press [ EXIT ] to go back to the simulation.


To draw a single card, press [ F1 ]. To draw multiple cards, press [ F2 ] for { +n }. At the prompt, press [AC/ON] and enter the number of cards.


We will have to memorize the cards or note the down on paper or another writing device.


To save the cards drawn, select [ F3 ] (STORE). There are three lists:


Draw: Draw number

Value: Card value. 1 = Ace, 11 = Jack, 12 = Queen, 13 = King

Suit: 1 = Heart, 2 = Club, 3 = Spade, 4 = Diamond


Lists can be allocated to the global list variables List 1 to List 26. Press [ F6 ] { EXE } to store the cards. Storing results works similarly in other applications.



Rolling Dice in Adventure Games





In adventure and fantasy games such as Dungeon and Dragons, sometimes dice beyond the standard six-sided die is needed. The Dice Roll (F2 from the Main Menu) has dice that are four-sided, six-sided, eight-sided, twelve-sided, and twenty-sided. Up to three dice can be thrown at once.


A Simple Lottery





Random integers from 0 to 99 can be drawn with the Random Numbers. Again, the set up menu is the key. For the lottery, turn the Repeat option off. Above are four draws from a simple lottery from 63 numbers.



This has been a look at Casio’s Probability Simulation Add-In. Until next time,


Eddie


All original content copyright, © 2011-2024. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Sunday, February 25, 2024

Casio Graphing Calculators: Equation Variables

Casio Graphing Calculators: Equation Variables



Introduction





Most modern Casio graphing calculators have an Equation solver mode that solves linear systems (Simultaneous), polynomials (Polynomial), and general equations.


To find run Equation mode, press [ MENU ] { A }*.


(*Equation mode is currently option A (fx-9750GIII, fx-CG 50, fx-CG 10/20, fx-9860 Slim))



Simultaneous Equations: SimRes and SimCoef




The simultaneous equation mode solves linear systems up to 6 x 6. The coefficients of the equations are stored in the variable Sim Coef (labeled SimCoef in VARS-EQUATION menu) while the results are stored in the variable Sim Result (labeled SimRes).



Polynomials: PlyRes and PlyCoef




The polynomial equation mode solves polynomials with real coefficients up to degree 6 (3 in early graphing models). The coefficients of the polynomial are stored in the variable Poly Coef (labeled PolyCoef in the VARS-EQUATION menu) while the results are stored in the variable Poly Result (labeled PolyRes).



Accessing Equation Variables Outside of Equation Mode





The four equation variables can be recalled by pressing [ VARS ], [ F6 ] { > }, [ EQUA ] { F3 }.


F1: SimRes (S·Rlt on older models)

F2: SimCoef (S·Cof on older models)

F3: PlyRes (P·Rlt on older models)

F4: PlyCof (P·Cof on older models)


The four variables are read-only matrices. We can not store values or information to read-only variables.


If we want to extract specific values from the equations variables, we must store them into a Matrix variable (A – Z, θ). For example, to retrieve the number from the 1st row and column of Sim Coef:


Sim Coef → Mat A

Mat A[1,1]


We can execute operations on equation variables. An interesting check is to run the simultaneous solver of the variable by typing:


Rref Sim Coef


and reading the last column.


Until next time,


Eddie


 All original content copyright, © 2011-2024. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.




Wednesday, April 24, 2019

Casio fx-CG50: Animation of a Graph

Casio fx-CG50:  Animation of a Graph

Introduction

You can easily animate a graph with the Dynamic Graphing mode.   While I'm describing this procedure for the fx-CG50, I'm pretty sure it is available for the earlier models such as fx-CG10, fx-9750GII, and fx-9860GII.

Specifically, you can dynamically change a single variable between two points with a specified step.

For example:  y = A*x  where A varies from 0 to 5, and its step is 1.

General Procedure

1.  Enter Dynamic Graph mode.  On the fx-CG50, press [ MENU ], [ 6 ].

2.  Type and select an equation.  The equation can be a function, a set of parametric equations, a polar equation, or on newer calculators, a shaded inequality.

3.  Press [ F4 ] (VAR) to take you to the variable screen.   Select the variable you want to animate.  You can animate any variable A - Z and θ.  Keep in mind that X is used for functions equations, T is used for parametric equations, and θ is for polar equations.

4.  Set the Animation Speed by pressing [ F3 ] (SPEED).  The speeds that can be selected are:

F1:  Stop & Go  (you advance the slides with the right and left arrows)
F2:  Slow speed
F3:  Normal speed
F4:  Fast speed

5.  Press [ F6 ] (DYNA) to start the animation.  To stop it, press [ AC ].

Example 

x1(t) = 1.2 * A * cos T
y1(t) = A * sin (T + 1) * cos (π/(3*T))
with π/12 ≤ T ≤ 2 π, step π/12





Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Tuesday, March 3, 2015

Casio Prizm and TI-84+: Modulus Program

Casio Prizm and TI-84+: Modulus Program
 
Formula:
A MOD B = B * frac(A/B) + B * (A<0 and B>0) + B * (B<0 and A>0)
(updated 1/6/2016)

Remove the prompt of A and B to make MODDIV suitable as a subroutine.

Casio Prizm: MODDIV (including fx-9860g & fx-9750g)
"A"? → A
"B" → B
B × Frac (A ÷ B) + B × (A < 0 And B > 0) + B × (B < 0 And A > 0)


TI-84: MODDIV
Prompt A, B
B * fPart(A/B) + B * (A<0 and B>0) + B * (B<0 and A>0)


Examples:

A mod B = R

A = 48, B = 3, R = 0
A = -52, B = 6, R = 2
A = 41.3, B = 12, R = 5.3
A = -50.2, B = 36, R = 21.8
A = 48, B = -7, R = -1

This blog is property of Edward Shore. 2015

Friday, May 16, 2014

fx-5800p Programs (can apply to Casio graphing calculators also, e.g. fx-9860g, Prizm)

This is a collection of programs I wrote on the Casio fx-5800p. These programs should also work on any Casio Graphing calculator (fx-9860g, fx-9750g, Prizm) since the programming language between Casio calculators remains largely the same.

Now if I can find my fx-5800p that I misplaced last night... *sigh*. Thank goodness for notes!

Notes for the fx-5800p programs:


There are no SIGN or MOD functions. Here are the work arounds I used (see SUN):

SIGN(x):
...
X > 0 ⇒ 1 → X
-X > 0 ⇒ -1 → X
...

n MOD d:
...
N - D Intg( N ÷ D ) → result variable
....

Table of Contents:

1. Rotation of (x, y) (ROTATEXY)
2. Law of Cosines (COSINES)
3. Pendulum: Period and Average Velocity (PENDULUM)
4. Arc Length of a Parabola (QUADLENGTH)
5. Position of the Sun (SUN)



1. fx-5800p: ROTATEXY

Rotates the coordinate (X, Y). The direction of rotation follows the conventional direction (counterclockwise). The variable A represents the angle (θ).

Program:
"X"? → X
"Y"? → Y
"ANGLE"? → A
[ [ X, Y ] ] × [ [ cos(A), sin(A) ] , [ -sin(A), cos(A) ] ]


2. fx-5800p: COSINES

Sides: D, E, F
Corresponding Angles: A, B, C

Program:
Lbl 0
Cls
"KNOWN:"
"1. D,E,F"
"2. A,E,F"
?→I
I = 1 ⇒ Goto 1
I = 2 ⇒ Goto 2
Goto 0
Lbl 1
"D"? → D : "E"? → E : "F"? → F
"A" : cos ⁻¹ (( E ² + F ² - D ² ) ÷ ( 2EF )) → A ◢
"B": cos ⁻¹ (( D ² + F ² - E ² ) ÷ ( 2DF )) → B ◢
"C" : 180° - A - B
Stop
Lbl 2
"A"? → A : "E"? → E : "F"? → F :
"D": √ (E ² + F ² - 2 E F cos A ) → D ◢
"B" : cos ⁻¹ ( ( D ² + F ² - E ² ) ÷ (2DF)) → B ◢
"C": 180° - A - B

3. fx-5800p: PENDULUM

Variables:
D = length of the step or bar holding the pendulum
L = length of the rod or string that is swinging
R = large radius of the circular ring

At the units, enter 0 for US units (set g = 32.174 ft/s^2), anything else for SI units (g = 9.80665 m/s^2).

Calculated:
T = period of the pendulum (the amount of time it takes for the pendulum from one end to the other)
V = average velocity of the pendulum (once in its in full swing)


Program:
Cls
"=0 U.S."
"≠0 SI"
? → G
If G = 0
Then 32.174 → G
Else g → G IfEnd // g from the constant menu (9.80665)
Lbl 0
Cls
"1. ROD 2. STRING"
"3. RING"
?→ I
I = 1 ⇒ Goto 1
I = 2 ⇒ Goto 2
I = 3 ⇒ Goto 3
Goto 0
Lbl 1
"D"? → D : "L"? → L
2 π √( L ÷ 3G ) → T : Goto 4
Lbl 2
"D"? → D : "L"? → L
2 π √(L ÷ G) → T : Goto 4
Lbl 3
"D"? → D : "L"? → L : "R"? → R
2 π √( R ² ÷ GL → T : Goto 4
Lbl 4
"T =" : T ◢ "V =": D ÷ T → V

-----

Test Examples:

Rod: D = 1 m, L = 1.6 m. Results: T = 14.36943096 sec, V = .0695921782 m/s

String: D = 2 m, L = 1.75 m. Results: T = 2.65423008 sec, V = .07535141995 m/s

Circular Ring: D = 2 ft, L = 2 ft, r = 1.2 ft
Results: T = 1.879851674 sec, V = 1.063913727 m/s

4. fx-5800p: QUADLENGTH

Find the length of a parabola given height and width and a corresponding equation:

f(x) = Ax^2 + Bx

Where
A = -4h/l^2
B = 4h/l

Program:
Cls
"LENGTH"? → L
"HEIGHT"? → H
Cls
"COEF OF X ²"
-4 H ÷ L ² ◢
"COEF OF X"
4 H ÷ L ◢
"ARC LENGTH"
∫ ( √ ( 1 + ( -8 H X ÷ L ² + 4 H ÷ L ) ) , 0, L)


Test Data:
L: 16.4, H: 8.2
X^2 coefficient: -.1219512195
X coefficient: 2


5. fx-5800P: SUN

Source for the formulas: http://aa.usno.navy.mil/faq/docs/SunApprox.php

Gives the RA (right ascension) and δ (declination) of the sun at any date. U is the universal time, the time it would be at Greenwich Village (Int'l Date Line).

For the Pacific Time Zone:
Standard Time: PST + 8 hours = UT
Daylight Savings Time: PDT + 7 hours = UT

Program:
"MONTH"? → M
"DAY?" → D
"YEAR"? → Y
"UNIV. TIME"? → U
Deg
100 Y + M - 190002.5 → X
X > 0 ⇒ 1 → X
-X > 0 ⇒ -1 → X
367 Y - Intg( 7 ( Y + Intg( ( M + 9 ) ÷ 12 ) ) ÷ 4 )
+ Intg( 275 M ÷ 9 ) + D + 1721013.5 + U ÷ 24
- .5 X + .5 → D
D - 2451545 → D
357.529 + .98560028 D → G
G - 360 Intg( G ÷ 360 ) → G
280.459 + .98564736 D → Q
Q - 360 Intg( Q ÷ 360 ) → Q
Q + 1.915 sin( G ) + .02 sin( 2G ) → L
L - 360 Intg( L ÷ 360 ) → L
1.00014 - .01671 cos( G ) - .00014 cos( 2 G ) → R
23.439 - .00000036 D → E
tan ⁻¹ (cos(E) tan(L)) → A
If L ≥ 90 And L < 270
Then A + 180 → A
IfEnd
If L ≥ 270 And L < 360
Then A + 360 → A
IfEnd
A ÷ 15 → A
sin ⁻¹ ( sin(E) sin(L) ) → C
"APPROX:"
"RA (HRS)": A ◢
"DEC (DEG)": C


Test Data:
M: 5
D: 14
Y: 2014
U: 19

RA: 3.43 hours
DEC: 18.746°


Eddie

This blog is property of Edward Shore. 2014

HP 20S: Acoustics Programs

HP 20S: Acoustics Programs Program A: Speed of Sound in Dry Air cs = 20.05 × √(273.15 + T°C) Code: 01: 61, 41, A: LBL A 02: ...