Casio Z1 Gr User Manual
Have a look at the manual Casio Z1 Gr User Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 338 Casio manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.
21 3.1 Scientific Calculations The scientific functions can be used either with BASIC programs or for manual calculations. For the sake of the explanation, all the examples here will cover only manual calculations. 3.1.1 Trigonometric and Inverse Trigonometric Functions SIN (Sine), COS (Cosine), TAN (Tangent), ARCSIN (Arc Sine), ARCCOS (Arc Cosine), ARCTAN (Arc Tangent). These functions return a trigonometric function value for a given angle, or an angle value of a given trigonometric function value. The ANGLE command should be used to specify the unit for the angle value when these functions are used. Angle unit specification is only required once for all subsequent trigonometric / inverse trigonometric functions. Angle units can be specified using either the MODE command or the ANGLE command. • DEG (Degrees) ANGLE0 MODE4 • RAD (Radians) ANGLE1 MODE5 • GRAD (Grads) ANGLE2 MODE6 It is as well possible to use the MENU 7. The relationship among these three specifications is: 90 Degrees = π/2 Radians = 100 Grads The current angle unit is retained when the power of the unit is switched OFF, and the angle unit becomes ANGLE0 (DEG) when ALL RESET button is pressed. The value for π can be directly entered into a formula using “PI” (3.141592654). EXAMPLE 1: sin (30°) = 0.5 OPERATION: Shift ANGLE 0 . . sin 30 . . ANGLE 0 SIN30 0.5 EXAMPLE 2: cos (π/3) = 0.5 OPERATION: Shift ANGLE 1 . . cos ( π / 3 ) . . ANGLE 1 COS(PI/3) 0.5
22 4 Formula Storage Function The formula Storage function is very useful when performing repeat calculations. Three different keys are used when working with the formula Storage function. IN key……. Stores presently displayed formula. OUT key…… Displays formula stored in memory. CALC key…. Assigns values to variables in formula, and displays formula calculation result. Sample Application EXAMPLE: Obtain the value for each of the value assigned to x when y = 3.43 cosx. (Calculate in three decimal places.) x 8° 15° 22° 27° 31° y OPERATION: First, specify the angle unit and number of decimal places MENU 7 , select the DEG unit using the ( / .. ) cursor keys. Exit the angle units selection menu pressing the CAL key. Shift SET F 3 . (Obtain in 3 decimal places by rounding off the 4th decimal place.) Next, input a formula and press IN key to store it. Y = 3 . 43 * COS X IN. Press the OUT key to confirm that the formula has been stored. CLS OUT Y=3.43*COSX_ Then, start calculating by pressing the CALC key. CALC X?_ 8 . . X?8 Y= 3.397 . . X?8 Y= 3.397 X?_ 15 . . X?8 Y= 3.397 X?15 Y=3.313 . .
23 Y= 3.397 X?15 Y=3.313 X?_ 22 . . X?15 Y=3.313 X?22 Y= 3.180 . . Y=3.313 X?22 Y= 3.180 X?_ 27 . . X?22 Y= 3.180 X?27 Y= 3.056 . . Y= 3.180 X?27 Y= 3.056 X?_ 31 . . X?27 Y= 3.056 X?31 Y= 2.940 BRK Y= 3.056 X?31 Y= 2.940 _ The CALC key can be used in place of the . . key to perform repeat calculations. The BRK key can be used to terminate this function to automatically return to the CAL mode. 4.1 Utilization for Preparing Tables Multiple formulas can be written by separating with colons ( : ). Tables such as that shown below can be easily prepared by using this method. EXAMPLE: Complete the following table. (Calculate in 3 decimal places by rounding off.) X Y P=X*Y Q=X/Y 4.27 8.17 6.07 2.71 1.17 6.48 9.47 4.36
24 OPERATION: SHIFT SET F 3 . . Specification of number of decimal places P = X * Y : Q = X / Y IN. Storing the formula CALC X?_ 4 . 27 . . X?4.27 Y?_ 1 . 17 . . X?4.27 Y?1.17 P= 4.996 . . X?4.27 Y?1.17 P= 4.996 Q= 3.650 Continue to input the values of X and Y in this manner, and the values of P and Q will be calculated in successive order and the table will be completed as shown below. X Y P=X*Y Q=X/Y 4.27 8.17 6.07 2.71 1.17 6.48 9.47 4.36 4.996 52.942 57.483 11.816 3.650 1.261 0,641 0.622 Variable names consist of up to 15 upper case or lower case alphabetic characters. This means that variable names can be created which actually describe their contents. Remarks can also be affixed following variable names by enclosing the remarks within square brackets [ ]. Any character except for commas can be used within the remarks brackets. EXAMPLE: Complete the following table. (Calculate in two decimal places by rounding off.) Radius r (m) Height h (m) Volume of a cylinder (V0=πr2h) (m3) Volume of a cone (V1=1/3 V0) (m3) 1.205 2.174 3.357 2.227 3.451 7.463 OPEARTION: Shift SET F 2 . . C Y L I N D E R Shift [ M 3 Shift ] = Shift π * R A D. .I. U. .S Shift [ M Shift ] ^ 2 * H E I G H T Shift [ M. Shift ] :. C O. .N E Shift [ M 3 Shift ] = C Y L I N D E. .R. / 3 IN.
25 CALC RADIUS[M]?_ 1 . 205 . . RADIUS[M]?1.205 HEIGHT[M]?_ 2 . 227 . . RADIUS[M]?1.205 HEIGHT[M]?2.227 CYLINDER[M3]= 10.16 . . RADIUS[M]?1.205 HEIGHT[M]?2.227 CYLINDER[M3]= 10.16 CONE[M3]= 3.39 . . HEIGHT[M]?2.227 CYLINDER[M3]= 10.16 CONE[M3]= 3.39 RADIUS[M]?_ 2 . 174 . CYLINDER[M3]= 10.16 CONE[M3]= 3.39 RADIUS[M]?2.174 HEIGHT[M]?_ And so on… If the radius (r) and height (h) are input in this manner, volume (V0) of the cylinder and volume (V1) of the cone will be calculated successively and the table will be completed as shown below. Radius r (m) Height h (m) Volume of a cylinder (V0=πr2h) (m3) Volume of a cone (V1=1/3 V0) (m3) 1.205 2.174 3.357 2.227 3.451 7.463 10.16 51.24 262.22 3.39 17.08 88.07 IMPORTANT 1. Up to 255 characters can be stored using the IN key. Storing new formula clears the currently stored formula. 2. Memory contents are retained even when power is switched OFF, either manually or by the auto power OFF function. 3. The CALC key can only be used to execute numeric expressions stored using the .IN. key. 4. An error is generated when an entry stored by the IN key is not a numeric expression. 5. The same limitations that apply to BASIC variables apply to formula storage function variables (see page 38). 6. Calculations are terminated under the following conditions: - Pressing the BRK key. - When an error is generated.
26 5 BASIC Programming Standard BASIC is employed as the programming language for this unit, and this section covers application of the BASIC language. 5.1 Features of BASIC 1. BASIC is much easier to use than other programming languages such as FORTRAN, making it suitable even for novices. 2. Writing programs is also easier because program creation, editing and execution are all performed by interacting with the computer itself. The following functions are also available: 1. High-precision calculations are made possible by display of numeric values with 10-digit mantissas and 2-digit exponents (13-digit mantissa and 2-digit exponents for internal operations) 2. A wide selection of built-in functions makes operation easier. Standard mathematical functions SIN COS TAN ASN ACS ATN LOG LN EXP SQR ABS SGN INT FIX FRAC PI ROUND RAN# DEG Powerful string handling functions CHR$ STR$ MID$ LEFT$ RIGHT$ HEX$ DMS$ ASC VAL LEN High-level mathematical functions POL REC NCR NPR HYPSIN HYPCOS HYPTAN HYPASN HYPACS HYPATN CUR 3. 10 independent program areas up to ten programs can be stored independently in memory at the same time (P0 – 9). 4. Extended variable names Variable names up to 15 characters long can be used, making it possible to use names that make contents easy to understand. 5. Powerful debugging function A TRON command displays the number of the program line currently being executed, making it possible to easily trace execution and locate mistakes in programming. 6. Powerful screen editor Programs can be easily modified and corrected on the screen. 7. Virtual screen function Thought the actual physical display of the unit has a 32-column x 4-line capacity, the virtual screen is 32 columns x 8 lines. The virtual screen can be easily scrolled using the cursor keys. 1 AAAA 2 BBBB 3 CCCC 4 DDDD 5 EEEE 6 FFFF Actual screen (4 lines) Virtual screen (8 lines) 7 GGGG 8 HHHH
27 5.2 BASIC Program Configuration 5.2.1 BASIC Program Format The following is a typical BASIC program, which calculates the volume of a cylinder. EXAMPLE: 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H 50 PRINT “V=”;V 60 END As can be seen, the BASIC program is actually a collection of lines (six lines in the above program). A line can be broken down into a line number and a statement. 20 R=15 Line Statement number Computers execute programs in the order of their line numbers. In the sample program listed above, the execution sequence is 10, 20, 30, 40, 50, 60. Program lines can be input into the computer in any sequence, and the computer automatically arranges the program within its memory in order from the smallest line number to the highest. Lines can be numbered using any value from 1 to 65535. 20 R=15 40 V=PI*R^2*H 60 END 10 REM CYLINDER 30 INPUT “H=”;H 50 PRINT “V=”;V 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H 50 PRINT “V=”;V 60 END Input sequence Memory contents Following the line number is a statement or statements which actually tell the computer which operation to perform. The following returns to the sample program to explain each statement in detail 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H 50 PRINT “V=”;V 60 END REM stands for “remark”. Nothing in this line is executed. Assigns the constant 15 (radius) to variable R. Displays H= to prompt a value input for height. Calculates volume (V) of cylinder. Prints result of line 40 Ends program. As can be seen, a mere six lines of programming handles quite a bit of data. Multiple BASIC program lines can also be linked into a single line using colons. EXAMPLE: 100 R==15:A=7:B=8 Such a program line is known as “multi-statement”.
28 5.3 BASIC Program Input 5.3.1 Preparation First, switch the power of the computer ON. At this time, the display should appear as illustrated below. CAPS . S . BASIC . DEG . RAD . GRA . _ This is the CAL mode, so the operation MENU 2 should first be performed to allow input of BASIC programs. The display should now appear as illustrated below. CAPS . S . BASIC . DEG . RAD . GRA . P 0 1 2 3 4 5 6 7 8 9 51146B Ready P0 Note the BASIC indicator on the left of the screen indicates the BASIC mode. This is the mode used for BASIC program input. The other indicators on tne display in the BASIC mode have the following meanings. P : Program area 0 – 9 : Program area numbers. The numbers of program areas which alreasy contain programs are replaces by asteriks. 51146B : Capacity (number of bytes) remaining in area for writing programs and data (free area). This number depends on the type of unit (FX-890P, Z1), the presence of the optional RP-33 memory module, and will decrease as storage space is used. Ready P0 : Current program area = area 0. The current program area can be switched by pressing Shift followed by the desired program area. Previously stored programs can be deleted using one of two different procedures. NEW : Deletes program stored in the current program area only. NEW ALL : Clears all BASIC programs stored in memory. 5.3.2 Program input The following input procedure inputs the sample program for calculation of the volume of a cylinder. 10 R E M SPC C Y L I N D E R . . 20 R = 15 . 30 I N P U T Shift “ H = Shift “ ; H . . 40 V = P I * R ^ 2 * H . . 50 P R I N T Shift “ V = Shift “ ; V . . 60 E N D . . Note that the . . key is pressed at the end of each line. A program line is not entered into memory unless the . . key is pressed. ONE KEY INPUT The one-key BASIC commands help to make program input even easier.
29 EXAMPLE: Line 50 input 50 Shift PRINT Shift “ V = Shift “ ; V . . 5.3.3 Program Editing The procedure used for making corrections or changes to a program depends upon what step of program input the changes are to be made. 1. Changes in a line before . . key is pressed 2. Changes in a line after . . key is pressed 3. Changes within a program already input 4. Changes within a program following the EDIT command Changes in a line before . . key is pressed EXAMPLE: 20 E=15 mistakenly input for 20 R=15 10 REM CYLINDER 20 E=15_ . (Move cursor to E) 10 REM CYLINDER 20 E=15 .R. (Input correct character) 10 REM CYLINDER 20 R=15 . . (Editing complete) 10 REM CYLINDER 20 R=15 _ Note that once the desired changes are made, the . . key must be pressed to store the entered line into memory. Changes in a line after . . key is pressed EXAMPLE: 40 V=P1*R^2*H mistakenly input for 40 V=PI*R^2*H 40 V=P1*R^2*H _ . .. .. .. .. .. .. (Move cursor to 1) 40 V=P1*R^2*H .I. (Input correct character) 40 V=PI*R^2*H . . (Editing complete) 40 V=PI*R^2*H _
30 Again, the . . key must be pressed to store the corrected line into memory after changes are made. Changes within a program already input The LIST command displays the program stored in the current program area form beginning to end. Shift LIST . . 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H … 40 V=PI*R^2*H 50 PRINT “V=”;V 60 END Ready P0_ The last line of the program is displayed when the LIST operation is complete. .. .. .. .. .. .. 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H The 8-line virtual screen of the computer now makes it possible to use the cursor keys to scroll to preceding lines not shown on the display. When a program greater than eight lines is stored in memory, the LIST operation should be performed by specifying the line numbers to be displayed. EXAMPLE: Displaying from line 110 to line 160 on the virtual screen. Shift LIST 110 - 160 . . Note: The BRK key can be used to terminate the LIST operation. The Shift STOP key suspends the operation, and listing can be resumed by pressing . . . Changes within a program following the EDIT command The EDIT command makes it easier to edit or review programs already stored in memory. Shift EDIT . . CAPS . S . BASIC . DEG . RAD . GRA . 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI+R^2*H From the display, .. (or . .) advances to the following line, while .. (or Shift . .) returns to the previous line.