- 1 Introduction and installation
- 2 First steps
- 3 Common CAS commands
- 4 Probabilities and statistics
- 5 Graphics
- 6 Programs
- 7 The 2d editor.
- 8 Managing sessions
- 9 Keyboard shortcuts.
- 10 Remarks
- 11 More complete version for the CG50
- 12 Copyright and Thanks to.
- 13 Developer infos.
Abstract: This document explains how to run efficiently CAS on some Casio calculators (CG10, CG20, CG50 and Fx-9750GIII, Fx-9860GIII). CAS is a port of the Giac/Xcas computer algebra system (CAS) for these calculators.
This document is interactive, you can modify and run commands by clicking in the ok button or by hitting Enter.
1 Introduction and installation
CAS is a port of the Giac/Xcas computer algebra system (CAS) for the following Casio calculators : CG10, CG20, CG50 and Fx-9750GIII, Fx-9860GIII. Beware:
- CAS are not allowed during exams in some countries, it is the user responsability to check the rules before running CAS in an exam. The authors shall not be held responsible for misuse of CAS in exam conditions.
- CAS is not compatible with exam mode. In countries where CAS calculators are allowed, there is no reason to forbid CAS. If many teachers send a mail to Casio asking for CAS compatibility, we increase the chances that Casio sign the addin and make it compatible with exam mode.
Two versions are available for the CG50, a light version that is the same as on CG10 and CG20 (in one file), and a more complete version in two files. The more complete version has more Xcas commands (like geometry commands), a 3d rendering engine, some additional apps (like a formal spreadsheet or a financial application) and a port of MicroPython 1.12 with more modules than the Casio port of MicroPython 1.09, cf. section 11.
Connect the USB cable of the calculator, type F1 for USB key connection
and copy the file
on the calculator-“key”
then disconnect the calculator-key from your computer and wait a few seconds.
If you test on the emulator,
from the main menu of the calculator (MENU), go to Memory
then F3 (Import/Export), then F1 (Import files),
select the file
type F1 to save to
the calculator root directory, confirm with F1 if you upgrade.
Be patient, the transfert will take several minutes. Once the transfert is finished, you should see the icon of Xcas in the main menu (a snowflake on the CG10/20/50).
Note that CAS is not compatible with the simulator distributed
by Casio on USB keys in some countries, you must run the emulator.
Once installed, the Windows version of the emulator can be run under Linux with wine
by the following command
wine "C:\Program Files (x86)\CASIO\fx-CG Manager PLUS Subscription for fx-CG50series\fx-CG_Manager_PLUS_Subscription_for_fx-CG50series.exe" /n"fx-CG Manager PLUS Subscription for fx-CG50series" &
2 First steps
From the main menu (MENU), move the cursor to the Xcas icon and hit EXE. This opens the “shell” (or history) where you can write most Xcas commands.
If you are running the 2 files version and see the message “Unable to load ram part”, upgrade your calculator OS (version 3.30 or greater).
For example, type
then EXE, you should see the result
You can copy a level from the history of commands by hitting the
up and down arrow keys (once or more) and EXE. Then you can
modify the command and run it with EXE. For example, up arrow twice,
1/3 and hit EXE.
The last result is stored in
ans(), hit the
calculator key (shift
(-)) to get it.
It is recommended to store the result in a variable if you want
to reuse a result later. There are two ways to store a value in a
=>using the key, for example
2=>Astores 2 in variable A. Now, every time you write
Ain a computation, it will be replaced by 2.
- left-store with
:=(shift ), for example
A:=2does the same as
The most popular Xcas commands are available from F1 (algebra)
and F2 (calculus), from various shortcuts (cf. section
or from the cmds (F4) or shift CATALOG, where
they are shortly explained with an example.
Hit F4 (cmds), choose a submenu,
Algebra, hit EXE,
move the selection to a command, for example
Now F6 will display a short help with an example. Hit F2
to copy the example in the commandline.
You can run it as is (EXE) or modify it and run it (EXE) if
you want to factor another polynomial.
When a command returns an expression, it is displayed in 2d mode. You can move with the pad if the expression is larger than the display. Type shift-F3 or ALPHA-F3 to modify the fontsize. Type EXIT to go back to the shell. The 2d view is in fact a 2d editor that will be explained later.
Now, try to type the command
Hint: type F4 (cmd), then select
When a command returns a graph, it will be displayed in a 2d frame.
You can modify the displayed area with
(zoom in or out,
(-) does a partial zoomout along ),
the cursor keys,
/ (orthonormalisation of the frame),
* (autoscale), VAR or OPTN is a switch to display or hide axis.
Type F1 (menu) to modify the graphic window settings Xmin, Xmax, Ymin, Ymax.
Type EXIT to go back to the shell.
The KhiCAS File menu (F6) has an item
Clear that will erase
the display. This will not clear the variables, to achieve that
VARS, select the last item (
and confirm with EXE.
Hit MENU to leave CAS. If you launch another application, the variables and history will be saved, they will be restored if you come back to CAS. First time save is sometimes slow (10 to 20 seconds), next save will run faster.
3 Common CAS commands
3.1 Expand and factor
From F4 commands catalog, select
Algebra, or type F1.
factor: factorization. Shortcut
=>*( key then *), for example
cfactorto factor over .
partfrac: expands a polynomial or performs partial fraction expansion over a fraction. Shortcut
=>+( then + key), for example
simplify: tries to simplify an expression. Shortcut
=>/( key then /), for example
ratnormal: rewrite as an irreducible fraction.
From F4 commands catalog, select
Calculus, or type F2
diff: derivative. Shortcut
'for derivative with respect to , example
are equivalent. For th-derivative, add , for example 3rd derivative
integrate: antiderivative (1 or 2 or 4 arguments) for example
Defined integration with 4 arguments, for example
computes . For an approximate computation, enter one boundary as an approx number, for example
limit: limit of an expression. Example
tabvar: table of variations of an expression. for example
one can check with the graph
series: Taylor expansion or asymptotic serie expansion, for example
polynomialif you do not want to have the remainder term.
sum: discrete summation, for example
computes the sum and rewrites it factored.
From F4 commands catalog, select
solvesolves an equation exactly. Takes the variable to solve for as second argument, unless it is
x, for example
If exact solving fails, run
fsolvefor approx solving, either with an iterative method starting with a guess
, or by dichotomy
For complex solutions, run
It is possible to restrict solutions using assumptions on the variable, for example
solvecan also solve (simple) polynomial systems, enter a list of equations as 1st argument and a list of variables as 2nd argument, for example intersection of a circle and a line:
linsolveto solve linear systems. enter a list of equations as 1st argument and a list of variables as 2nd argument, example:
desolveto solve exactly a differential equation. for example, to solve , type
Another example with an initial condition:
odesolvefor approx solving or
plotodefor a graphic representation of the approx. solution.
rsolvesolves some recurrence relations , for example to solve the arithmetico-geometric recurrence , type:
When required, the distinction between integer arithmetic
and polynomial arithmetic is done by a prefix
integer commands. For example
ifactor for integer factorization
factor for polynomial factorization
cfactor for polynomial factorization over ).
Some commands work for integers and polynomials, like
From F4 catalog, select
Arithmetic, Crypto. Shortcut
irem(a,b)quotient and remainder of euclidean division of two integers.
isprime(n)checks whether is prime. This is a probabilisitic test for large values of .
ifactor(n)factorizes an integer (not too large, since algorithms used are trial division and Pollard-, there is no space left in memory for quadratic sieve), for example
Shortcut then * (
lcm(a,b)GCD and LCM of two integers or polynomials.
iegcd(a,b)returns 3 integers such that where is the GCD of et , and .
ichinrem([a,m],[b,n])returns (if possible) such that and (if are coprime, exists).
powmod(a,n,m)returns computed by the fast modular powering algorithm
ascconverts a string to a list of ASCII code,
charconverts back a list to a string. These commands may be used to easily write cryptographic algorithms with string messages.
From F4 catalog, select
The default variable is , otherwise you can specify it as last
optional argument. For example
degree(x^2*y,x) return 2,
degree(x^2*y,y) returns 1.
coeff(P,n)coefficient of in ,
lcoeff(P)leading coefficient of , for example
degre(P)degree of polynomial
rem(P,Q)quotient and remainder of euclidean division of
proot(P): approx. roots of (all roots, real and complex)
interp(X,Y): for two lists of the same size, returns the interpolating polynomial such that .
resultant(P,Q): resultant of polynomials and
hermite(x,n): -th Hermite polynomial (orthogonal for the density on )
laguerre(x,n,a): -th Laguerre polynomial
legendre(x,n): -th Legendre polynomial (orthogonal for the density on )
tchebyshev2(n)Tchebyshev polynomials of 1st and 2nd kind defined by :
3.5 Linear algebra, vectors, matrices
Xcas does not make distinction between vectors and lists. For example,
defines 2 vectors and , then
dot will compute
the scalar product of and :
A matrix is a list of lists of the same size.
You can enter a matrix element by element using the
matrix editor (shift-MATR EXE or F6 0). Enter a new variable
name to create a new matrix
or the name of an existing variable to edit a matrix.
, key may be used to insert a line or column, and
DEL key erases the line or column of the selection
UNDO if you want to go one step back).
For small matrices, it is also convenient to enter them directly in the
commandline, for example to define
It is recommended to store matrices in variables!
If a matrix is defined by a formula, then it’s better to use the
matrix command (shift-MATR EXE AC), for example:
returns the matrix where coefficient line and column is (beware, indices begin at 0).
idn(n) to get the identity matrix of order
get a matrix with random coefficients with dimensions .
For basic arithmetic on matrices, use keyboard operators
+ - *, inverse). Otherwise, open catalog and
eigenvalues and eigenvectors of matrix .
finds the Jordan normal form of matrix , returns matrices and such that , with upper triangular (diagonal if is diagonalizable)
computes matrix to the -th power, where is symbolic.
rref: row reduction to echelon form
lu: factorization of matrix , returns a permutation and two matrices (lower) and (upper) such that . The result of
may be passed as an argument to the command
to solve a system by solving two triangular systems (in instead of ).
qrfactorization of matrix , is orthogonal and upper triangular, .
svd(A)singular value decomposition of matrix returns orthogonal, vector of singular values, orthogonal such that
The ratio of the largest and the smallest singular value of is the condition number of relative to the Euclidean norm.
4 Probabilities and statistics
4.1 Random numbers
From F4 catalog, select
(real in ) or
(integer between 1 and ). Other commands with prefix
rand are available, followed
by the name of the law, for example
returns a random integer according to binomial law of parameters .
For a random vector or matrix, run
Alglin, Matrice submenu),
for example for a vector with 10 random
reals according to normal law (mean 0, stddev 1), type
From F4 catalog, select
There you will find a few distribution laws:
uniformd. Other distribution must be keyed in:
To get the cumulated distribution function, enter the law name then
_cdf suffix (shortcut: select
cdf in the catalog at the end and press F1).
Inverse cumulated distribution function follows the same principle
_icdf suffix (shortcut:
cdf in the catalog and press F2).
Example : find the centered interval for the normal law of
mean 5000, standard deviation 200, such that the probability
to be outside is 5%
4.3 1-d statistics
The statistic functions are taking lists as arguments, for example
From F4 catalog, select
: arithmetic mean of a list
: standard deviation of a list.
to get an unbiaised estimate of the standard deviation of a population from a sample
returns respectivly the median, first and third quartile of a list.
For 1-d statistics with frequencies, replace
by two lists of the same length, the first list being the
values of the serie, the second list the frequencies.
For graphic representations, open catalog,
4.4 2-d statistics
From F4 catalog, select
correlation(X,Y): correlation of two lists and of the same length.
covariance(X,Y):: covariance of two lists and of the same length.
- regression computations:
run commands with suffix
_regression(X,Y), for example
linear_regression(X,Y)returns coefficients of the linear regression line .
linear_regression_plot(X,Y)and all commands of suffix
_regression_plotwill display the line (or curve) of the regression. These commands will also print the coefficient that give information on the quality of adjustment ( near 1 is good).
From F4 catalog, select
Graphics (shortcut 7).
plot(f(x),x=a..b)plot expression for . Discretization option:
xstep=, for example
Default is 384 evaluations per plot (one per horizontal pixel).
plotseq(f(x),x=[u0,a,b])webplot for a recurrent sequence of first term , for example if , with a plot on
plotparam([x(t),y(t)],t=tm..tM)parametric plot for . Discretization option:
plotpolar(r(theta),theta=a..b)polar plot of for , for example
plotlist(l): plot a list
l, i.e. draws a polygonal line with vertices (index starts at 0).
plotlist([X1,Y1],[X2,Y2],...)polygonal line with vertices the points of coordinates
polygonscatterplot(X,Y)for two lists
X,Yof the same size, draws the points or a polygonal line of vertices
histogram(l,class_min,class_size)plots the histogram of data in
l, class size
class_size, first class starts at
class_min. Example: check the random generator quality
plotcontour(f(x,y),[x=xmin..xmax,y=ymin..ymax],[l0,l1,...])plot implicit curves .
plotfield(f(t,y),[t=tmin..tmax,y=ymin..ymax])plot the field of tangents for the differential equation . Add the optional last parameter
,plotode=[t0,y0]to plot simultaneously the solution with initial condition . Example for and
plotodemay be used outside of
For simultaneous plots, write commands separated by
For display options, press the OPTN key:
display=colorcolor option: select a color then press F2, for example
display=line_width_8: change segments width (including inside polygonal line used to plot a curve). Simultaneous display options should be added with
+. For example
- Circles and rectangles with edges parallel to the coordinate
axis may be filled with
display=filled(this attribute might be added to other attributes)
- If you want to define the display window (overwriting
the autoscale computation), select
gl_yand add an or interval, for example
gl_commands must preced the plotting command.
- If you want to remove axes, select
axesand press F2 (
axes=0must preced the plotting command. Axes can be removed interactively when the graph screen is displayed by pressing VARS.
You can program either with Xcas-like syntax (English or French) or with Python-like syntax.
Example : function defined by an algebraic expression
for example simple confidence interval for a frequency in a sample
Second example : more precise confidence interval for a frequency
in a sample of size :
To avoid computing twice the same quantity, one can insert a local variable. The commandline is not well adapted to write these kinds of functions. For non algebraic functions, it is best to run the program editor. Press F6, select Script Editor, clear the editor if it is not empty (F6 Clear) and type with the help of test (F1), loop (F2) for programming structures the following program, in Xcas syntax:
or in Python syntax:
Type EXE to check the syntax. Once the program is correct, save it (F6 2), then type EXIT. Now you can call your program from the commandline like this
Third example : a loop printing integer squares
from 1 to in Python syntax.
Check that Python syntax is enabled in the F6 or shift-SETUP menu,
if it is not checked, check it.
Open F6 Script Editor, if there is some old script source,
clear it (F6 Clear).
f(x):= from F2 (or from F4, Program, function def),
you should get
(press F5 to lock the keyboard in alpha lowercase), move to the end of
the line and press shift-EXE to input a newline.
Type Shift-PRGM then
3 for, then F5 J space alpha, then
6 in range(a,b). Type
then F1 (
:). Type shift-EXE to insert a newline
then Alpha SPACE,
F4 (Cmds), EXE (
1 All), P, R select
j,j^2) then EXE.
def f(n): for j in range(1,n+1): print(j,j^2)
^ means power,
** is also accepted like in
Now, type EXE (or F6, select
1. Check syntax). If syntax is correct,
you will see
Success in the status line. Otherwise, the
first error line number and token will be displayed and cursor will
be positionned at the line where the error was detected. Note that
the error may be before this line but it was only detected later. Note
also that if you are using Python syntax compatibility, programming
structures are translated into Xcas, errors are displayed after
translation, therefore you might see token errors like
that were added by the translator.
If the program is correct, you can save it with the F6 menu (save or save as).
You can run it from the commandline by pressing EXIT then for
f(10) should display all squares from 1 to 10.
The turtle is a nice way to learn programming. The turtle is a small
robot that you can move, it handles a pen that marks its path.
Type F6, Script Editor, then F6 Clear. Type shift-QUIT select
efface which means clear the screen. You can
access to the turtle commands using shift-QUIT (move the cursor to
a command and press F6 for help). For example try
(forward). Checking the syntax (EXE)
will display the turtle window moves.
You can enter several moves in your script, and organize them
inside tests, loops and functions.
function square(n) repete(4,avance n,tourne_gauche); ffunction:; efface; for n from 1 to 10 do square(10*n); od;
Another example of non algebraic function: the euclidean algorithm
to compute the GCD of two integers.
Press shift-EXE to insert a newline.
! is in the
Programmation_cmds (11, shortcut )
or in the test F1 menu.
function pgcd(a,b) while b!=0 do a,b:=b,irem(a,b); od; return a; ffunction
def pgcd(a,b): while b!=0: a,b=b,a % b return a
If your program has runtime errors or if you want
to see it run step by step, run
debug on it,
Unlike adaptations of Micro-Python by calculator manufacturers (including
Casio), the Python syntax in Xcas is fully integrated.
You can therefore use all Xcas commands and data types in your programs.
This corresponds approximatively to importing Python modules
There is also a small
pixelised graphic commands set
set_pixel() to synchronize
c parameter is optional,
draw_arc(x,y,rx,ry,t1,t2,c) draws an ellipsis arc).
And you can somewhat replace
with graphic commands of CAS
histogram and all
commands). Plus you have natural access to data types
like rationnals or expressions, and you can run CAS commands on them.
The complete list of commands available on the calculator
is given in appendix. For documentation on commands not listed
in the catalog categories, please refer to Xcas documentation.
7 The 2d editor.
If a computation returns an expression, it will be displayed in the 2d expression editor. This also happens if you press F3 when the selected level is an expression, or if you press F3 from the commandline if the line is empty or contains a syntaxically correct expression.
Once the 2d editor is open, the expression is displayed in full screen and all or part of the expression is selected. One can run a command on the selection (from the menus or from the keyboard), or edit (in 1d mode) the selection. This is an efficient way to rewrite expressions or edit them.
Example 1 : enter From an empty commandline, type F3 (view), you should see 0 selected. Type x then EXE, this will replace 0 by x selected. Type SIN, now should be selected. Type the division key (above -), you should see with 0 selected, type x then EXE, you should now see with x (below the fraction) selected. Type the up arrow key, now should be selected. Now type F2 4 (for limit). The expression is ready to eval, type EXE to copy it to the commandline and EXE again to eval it. For the same limit at , before leaving the 2d editor with EXE, move the selection with the right arrow key, then type F1 8 (oo) EXE.
Example 2 :
From an empty commandline, type F3 (view), then F2 3 (integrate),
you should see:
with selected. We must modify the 1 (upper bound) and
the 0 (integrand). Press left arrow key, this will select the
integrand 0, type
1/(x^4+1) EXE, then left arrow key F1 8 EXE.
Type again EXE to copy to commandline, EXE again to run the computation,
the result will be displayed in the 2d editor, EXE will leave the 2d
editor, with the integral and its value in the history.
Example 3 : compute and simplify
From an empty commandline, type F3 (view), then F2 3 (integrate),
you should see
Move the selection to the lower bound 0 (right arrow key),
type DEL, you should see
selected. With the down arrow key, select 0, type
EXE copy to the commandline, EXE to run the compuation, the result
is now displayed in the 2d editor.
With the arrow key, select one of the arctangent, type F1 EXE (simplify), this will make a partial simplification, do the same on the second arctangent.
For a more complete simplification, we will collect the logarithms. The first step is to exchange two terms of the main sum so that the logarithms are grouped. Select one of the logarithm with the arrow keys, then type
- CG10,20,50 : shift-left or right arrow key
- fx-9860GIII: F5 left or right arrow key, then ALPHA
this will exchange the selection with the right or left sibling.
Now type ALPHA right or left arrow key to extend the selection adding
the right or left sibling. Once the two logarithm terms are selected,
press F1 2 EXE (factor), decrease the selection to the numerator,
type F4 EXE (All), type the letters l, n, c, this moves in the
catalog to the first command beginning with
lncollect, EXE and F6 (eval).
8 Managing sessions
8.1 Modifying a session
With the up/down cursor keys, you can move in the history, the current level is printed with reverse colors.
You can move one level in another position with ALPHA-up and ALPHA-down. You can delete a level with the DEL key (the level is copied into the clipboad).
You can modify an existing level with F3 or ALPHA-F3. With F3, the 2d
editor is called if the level is an expression, with ALPHA-F3 the level
is edited in the text (program) editor. Type EXIT if you want to cancel
modifications, or EXE if you confirm the modifications. If you confirm
the modifications, the commandlines below the current level will
automatically be re-evaled. This way, if you modify for example
a level like
A:=1, all levels below that depend on the value
A will be up to date. If you want to do that several times,
it is best to introduce a parameter with the F6 Parameter wizzard. Then
pressing + or - on the
will modify the value of the parameter (press * or / for faster move).
Press VARS to see which variables are assigned to a value. Select a variable
name, press EXE to copy it to the commandline, DEL will input the command
that erases the variable (confirm with EXE).
purge all variables at once (press
AC/ON to clear the history
and start a fresh new session).
assume is a command to
make assumptions on a variable, like
can be accessed from the shift-PRGM menu).
8.3 Archiving and exchanging with Xcas
On the calculator, go back to the history (type EXIT if you are in the
programming editor or the 2d expression editor).
From the F6 menu, you can save/restore sessions in the
calculator flash memory. Files have the
xw extensions. They
can be copied to your computer (connect the calc, choose F1 USB key),
and there they may be opened with Xcas or Xcas for Firefox.
From Xcas, choose the File menu then Open file, then select
all type of files and open the session file.
Xcas for Firefox, press the Load button.
Conversely you can save a session from Xcas (choose File, Export to Khicas) or from Xcas for Firefox (choose Export at the right of the session name).
9 Keyboard shortcuts.
9.1 KhiCAS 50 and 90 versions (2 files)
These shortcuts are valid inside the shell and text programming editor. With default configuration:
- F1-F6, shift-F1 to shift-F6, alpha-F1 to alpha-F6: see legend at screen bottom
- OPTN: fast menu for color options
- shift-OPTN: programming commands
- VARS: variables list
- shift-PRGM: fast menu for programming
- MENU: back to main Casio menu
- shift-SETUP: setup
- EXIT: switch from shell to editor
- shift-EXIT: display logo turtle screen
- ALPHA-EXIT: if alpha is not locked, displays last 2d or 3d graph
- shift angle: fast menu for geometry
%inside shell, indentation in editor, force sheet reeval in spreadsheet
- shift-fraction: fast menu for poynomial arithmetic in shell, completion in editor
- touche SD: additional apps (spreadsheet, finance, ...). Inside spreadsheet, display sheet graphs.
- shift :
:depends on active interpreter Xcas or Python
- shift INS: table of ASCII characters
- AC/ON: cancel selection or cancel search/replace
- shift CAPTURE: save session or file
- shift CLIP: begin selection or copy selection to clipboard
- shift PASTE: paste clipboard
- shift CATALOG: list of all Xcas commands
- shift FORMAT: programming commands
- shift 6: fast menu with
comb, rand, binomial, normald
- shift List: fast list menu
- shift Mat: fast matrix menu
- shift 3: menu rapide algèbre linéaire
- shift EXE: next line in editor
You can modify fast menus shortcuts by editing the file
FMENU.py. Delete the file from Memory Casio application
to reset to default configuration.
9.2 KhiCAS short version (1 file))
- F1 to F3 : depends on mode (Python/Xcas) and shift/alpha state, see labels
- F4: commands catalog.
- F5: uppercase to lowercase switch. If alpha mode is not active, locks the keyboard in alpha lowercase.
- F6: File menu
- cursor down from shell or shift fraction key from program editor (G key): completion/online help
(-)in the text editor: returns the
- shift PRGM: programming commands or characters
- OPTN: all options
- shift-QUIT: turtle commands
- shift-List: create or edit a list, list commands
- shift-Mat: create or edit a matrix, matrix commands
- SD key: real number commands
- yellow shifted SD key: integer commands
- angle key: complex commands
- yellow shifted fraction: plot commands
- fraction key: special characters/proba in history, indentation in text editor
- red r key:
- red key:
In programming editor
- shift-cursor key: move to begin/end of line or file
- shift CLIP: begin selection. Move the cursor to the selection end, type DEL to remove the selection (it will be copied to clipboard) or again shift-CLIP to copy selection to clipboard without removal. Type AC/ON to cancel selection.
- EXE: if a search/replace is currently active (F6 6) find next word occurence. Otherwise parse/execute.
- shift EXE: add a newline.
- DEL: remove selection or previous character if no selection active
- shift PASTE: copy clipboard
- Shift-INS (touche DEL): remove current line and copy to clipboard
- AC/ON: cancel selection or cancel search/replace or check syntax (like F6 1)
- EXIT: leave text editor to the commandline. Type EXIT again to come back to the text editor.
On color models, you must first press MENU before shutting down the calculator with shift ON. When you press ON again, press MENU to go back in KhiCAS.
If you connect a color model to your PC as a USB disk, you will have to press a key after you have pressed F1, otherwise nothing happens.
The memory available for computations is about 500K with the color g3a addin on the CG50, and 58K on the monochrom g1a addin.
11 More complete version for the CG50
The light version in one file is not a full version of Xcas because the maximal size for a Casio add-in is too small (2 Mo). A more complete version of CAS for the FXCG50 is distributed in 2 files (one of them is run from a section of the RAM of the FXCG50 that is currently not used by Casio).
This more complete version has more Xcas commands (like geometry commands), a 3d rendering engine, some additional apps (like a formal spreadsheet or a financial application) and a port of MicroPython 1.12 with more modules than the Casio port of MicroPython 1.09.
See section 1 to install.
11.1 MicroPython 1.12
You can select the shell interpreter by typing shift SETUP. The menu background color of the shell reflects the active interpreter (yellow=MicroPython, magenta or cyan for Xcas native or Xcas Python compatible).
Available modules: turtle (more complete version, with filled objects), graphic (more complete than casioplot), matplotl, arit (integer arithmetic), linalg/numpy (linear algebra, matrices), ulab (scipy compatibility), cas (CAS from Python).
11.2 Geometry, 3d graphs
Xcas basic 2-d and 3-d geometry commands are available.
One can plot
2 variables function or parametric plots, cones, solids, planes, ...
For example type
F4 * 5 F2 EXE to draw a cube or
1 to select the plot command, and enter
Beware, the 3d rendering engine is slow on the calculator, therefore the drawing precision is set to a medium value by default (this impacts mostly objects with angles, like polyhedrons). You can modify the rendering precision with F2 (faster, less precise) or F3 (slower, more precise).
Note that during the addin execution, the CPU speed is overclocked using code from Sébastien Michelland, similar to the Ptune3 addin.
If you just want one time a higher
precision rendering, type
^ and be patient. If you want to
interrupt this rendering, press DEL. Use the cursor keys to change the
viewpoint, 5 to reset to default viewpoint, and
to zoom in/out.
While a cursor key is
kept pressed, the precision is lower, when the key is released the
last position is redrawn with the default precision.
Type F4 to show/hide a second hidden objet, F5 to show/hide
intermediate points, F6 to show/hide polyhedron edges.
11.3 CAS spreadsheet...
The file menu has an application item that lets you select additional applications: a formal spreadsheet, a finance app, a periodic table, .... Shortcut: type SD from the shell or programming editor.
Unlike Casio spreadsheet, the CAS spreadsheet can handle exact or symbolic values. You can compute cells whose values are fractions, square roots or expressions containing variables like .
A cell can contain any valid Xcas value, numbers, strings, etc.
If you enter a list of values, or an Xcas command returning a list
of values, the list will fill consecutives cells (downwards or to the
right, according to the setup). For example type F1
10 EXE, this will fill 10 cells with numbers from 0 to 9.
Defining a cell content with reference to other cells
is similar to other spreadsheet, begin with
=, and enter an expression that may contain cell references
$ are available from F3 menu,
: is also accessible with shift ). While editing
the cell content, you can select another cell by pressing the up or
down cursor key followed by any other cursor key. To select a range,
move to the begin of selection cell,
press shift-CLIP then move to the end of selection and type EXE.
While defining a cell, any Xcas commands may be used (you can get them from F4 menu, or fast menus (F1, F2, shift F1-shift F6, alpha F1-alpha F6 or shift CATALOG). Programming Xcas structures may also be used as well as Xcas functions that you have defined. Beware that MicroPython functions are not supported.
A cell can be defined with a command returning a graphic result. Type the SD key to display the graphic corresponding to the graphical output of the whole spreadsheet.
12 Copyright and Thanks to.
- Giac and CAS, computing kernel (c) B. Parisse et R. De Graeve, 2022.
- CAS interface adapted by B. Parisse from Eigenmath source code by Gabrial Maia and from Xcas source code.
- CAS license GPL2. See details in
LICENSE.GPL2file, inside khicasio.zip or GPL2 on the Free Software Foundation website. The source code of CAS and of the required libraries libtommath and USTL are available in the Casio section of my webpage (see section 13).
- Thanks to the active members of tiplanet and Planete Casio for answering questions and testing during the time I developed CAS. Special thanks to LePhenixNoir (Prizm/35+eii help), Nemhardy (Prizm), and to critor for articles, tests and advertising. Thanks to all contributors of the Prizm programming portal. Thanks to Pavel Demin for compilation tricks that spared about 135K.
- Thanks to Camille Margot for her interest in this ports, and to Casio France for sending me calculators and an emulator license.
13 Developer infos.
Quick linux install : get
and copy it to
/usr/local/lib, check that
/usr/local/lib is in the paths listed in
/etc/ld.so.conf and run
this is a working cross-gcc for Casio calculators with additional
libraries (libc, ustl, tommath).
You will also need to install
to build addins for the FXCG.
Then get giac2.tgz
unarchive and run
make. For the light version get giac90.tgz
If something goes wrong, here are some details.
You must install the gcc cross-compiler
for sh3eb CPU, following this
I have configured gcc like this
../gcc-5.3.0/configure --target=sh3eb-elf --prefix="$HOME/opt/sh3eb-elf" --disable-nls --disable-shared --disable-multilib --enable-languages=c,c++ --without-headers
Unfortunately, there is no support for sh3eb in the
(C librairy) of gcc, nor for
The libc is replaced by
(for CG50) (it comes from the original SDK with a few modifications,
corrections of small bugs, added missing functions like qsort, ...),
In the same
folder, you will also find
tommath.tgz (big integer
ustl.tar.gz (standard template library)
that I also had to modify to make it work with sh3eb-elf-g++,
with partial success, i.e. enough support to build Giac
(vector/string/map supported, I/O on files are not supported,
there is a custom iostream file for cin/cout minimal support).
Unarchive and compile with make.
For the monochrom Fx-9860GIII, get
make in the