Skip to content
Browse files

Sample matrix question added.

  • Loading branch information...
1 parent 68579f6 commit f74dfb95b8ac4c2365ba6cec44159763ba3236bd @sangwinc sangwinc committed Jun 27, 2012
View
4 doc/en/Authoring/Sample_questions.md
@@ -20,6 +20,10 @@ A rectangle has length 6cm greater than its width. If it has an area of 27cm$^2$
This is a multi-part question which illustrates _follow-through marking_. Get the first part wrong, but the second part correct based on the first part to see the feedback.
+### `test_3_matrix.xml` ###
+
+This question creates two random matrices and asks students to multiply them together. See the notes on [matrices](../CAS/Matrix.md).
+
### `railways.xml` ###
In a railway journey of 90km an increase of 5 kilometers per hour in the speed decreases the time taken by 15 minutes.
View
11 doc/en/CAS/Matrix.md
@@ -39,6 +39,17 @@ The above equation is then generated by the CASText
\[ @A@+@B@=@C@=@D@.\]
+A similar procedure is needed for showing working when multiplying matrices. Here we need to loop over the matrices, but there must be a more elegant way to do this.
+
+ A:ev(rand(matrix([5,5],[5,5]))+matrix([2,2],[2,2]),simp);
+ B:ev(rand(matrix([5,5],[5,5]))+matrix([2,2],[2,2]),simp);
+ BT:transpose(B);
+ C:zeromatrix (first(matrix_size(A)), second(matrix_size(A)));
+ S:for a:1 thru first(matrix_size(A)) do for b:1 thru second(matrix_size(A)) do C[ev(a,simp),ev(b,simp)]:apply("+",zip_with("*",A[ev(a,simp)],BT[ev(b,simp)]));
+ D:ev(C,simp);
+
+Notice we need to simplify the arguments before we take indices of expressions. This is one problem with `simp:false`.
+
## Vectors ##
If you are trying to use the vector notation such as \(3i+4j\) you will probably want to redefine \(i\) to be an abstract symbol, not a complex number.
View
0 samplequestions/CR-Diff-01_basic.xml → samplequestions/CR_Diff-01_basic.xml
File renamed without changes.
View
212 samplequestions/test_3_matrix.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<quiz>
+<!-- question: 94 -->
+ <question type="stack">
+ <name>
+ <text>test_3_matrix</text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Calculate \[ @A@.@B@\]</p>
+<p> [[input:ans1]] [[validation:ans1]]</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html">
+ <text><![CDATA[<p>To multiply matrices $A$ and $B$ we need to remember that the $(i,j)$th entry is the scalar product of the $i$th row of $A$ with the $j$th column of $B$.</p>
+<p>\[ @A@.@B@ = @C@ = @D@.\]</p>]]></text>
+ </generalfeedback>
+ <defaultgrade>1.0000000</defaultgrade>
+ <penalty>0.1000000</penalty>
+ <hidden>0</hidden>
+ <questionvariables>
+ <text><![CDATA[A:ev(rand(matrix([5,5],[5,5]))+matrix([2,2],[2,2]),simp);
+B:ev(rand(matrix([5,5],[5,5]))+matrix([2,2],[2,2]),simp);
+TA:ev(A.B,simp);
+TB:ev(A*B,simp);
+BT:transpose(B);
+C:zeromatrix (first(matrix_size(A)), second(matrix_size(A)));
+S:for a:1 thru first(matrix_size(A)) do for b:1 thru second(matrix_size(A)) do C[ev(a,simp),ev(b,simp)]:apply("+",zip_with("*",A[ev(a,simp)],BT[ev(b,simp)]));
+D:ev(C,simp);]]></text>
+ </questionvariables>
+ <specificfeedback format="html">
+ <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
+ </specificfeedback>
+ <questionnote>
+ <text>$@A@.@B@=@TA@$</text>
+ </questionnote>
+ <questionsimplify>0</questionsimplify>
+ <assumepositive>0</assumepositive>
+ <prtcorrect format="html">
+ <text><![CDATA[<p><span class="correct">Correct answer, well done.</span></p>]]></text>
+ </prtcorrect>
+ <prtpartiallycorrect format="html">
+ <text><![CDATA[<p><span class="partially">Your answer is partially correct.</span></p>]]></text>
+ </prtpartiallycorrect>
+ <prtincorrect format="html">
+ <text><![CDATA[<p><span class="incorrect">Incorrect answer.</span></p>]]></text>
+ </prtincorrect>
+ <multiplicationsign>dot</multiplicationsign>
+ <sqrtsign>1</sqrtsign>
+ <complexno>i</complexno>
+ <variantsselectionseed></variantsselectionseed>
+ <input>
+ <name>ans1</name>
+ <type>matrix</type>
+ <tans>TA</tans>
+ <boxsize>3</boxsize>
+ <strictsyntax>1</strictsyntax>
+ <insertstars>0</insertstars>
+ <syntaxhint></syntaxhint>
+ <forbidwords></forbidwords>
+ <forbidfloat>1</forbidfloat>
+ <requirelowestterms>1</requirelowestterms>
+ <checkanswertype>1</checkanswertype>
+ <mustverify>1</mustverify>
+ <showvalidation>1</showvalidation>
+ </input>
+ <prt>
+ <name>prt1</name>
+ <value>1.0000000</value>
+ <autosimplify>1</autosimplify>
+ <feedbackvariables>
+ <text></text>
+ </feedbackvariables>
+ <node>
+ <name>0</name>
+ <answertest>AlgEquiv</answertest>
+ <sans>ans1</sans>
+ <tans>TA</tans>
+ <testoptions></testoptions>
+ <quiet>1</quiet>
+ <truescoremode>=</truescoremode>
+ <truescore>1.0000000</truescore>
+ <truepenalty></truepenalty>
+ <truenextnode>-1</truenextnode>
+ <trueanswernote>1-0-T </trueanswernote>
+ <truefeedback format="html">
+ <text></text>
+ </truefeedback>
+ <falsescoremode>=</falsescoremode>
+ <falsescore>0.0000000</falsescore>
+ <falsepenalty></falsepenalty>
+ <falsenextnode>1</falsenextnode>
+ <falseanswernote>1-0-F</falseanswernote>
+ <falsefeedback format="html">
+ <text></text>
+ </falsefeedback>
+ </node>
+ <node>
+ <name>1</name>
+ <answertest>AlgEquiv</answertest>
+ <sans>ans1</sans>
+ <tans>TB</tans>
+ <testoptions></testoptions>
+ <quiet>1</quiet>
+ <truescoremode>=</truescoremode>
+ <truescore>0.0000000</truescore>
+ <truepenalty></truepenalty>
+ <truenextnode>-1</truenextnode>
+ <trueanswernote>1-1-T </trueanswernote>
+ <truefeedback format="html">
+ <text><![CDATA[<p>Remember, you don't multiply matrices by multiplying the corresponding entries! A quite different process is needed.</p>]]></text>
+ </truefeedback>
+ <falsescoremode>=</falsescoremode>
+ <falsescore>0.0000000</falsescore>
+ <falsepenalty></falsepenalty>
+ <falsenextnode>2</falsenextnode>
+ <falseanswernote>1-1-F </falseanswernote>
+ <falsefeedback format="html">
+ <text></text>
+ </falsefeedback>
+ </node>
+ <node>
+ <name>2</name>
+ <answertest>AlgEquiv</answertest>
+ <sans>ans1</sans>
+ <tans>A+B</tans>
+ <testoptions></testoptions>
+ <quiet>1</quiet>
+ <truescoremode>=</truescoremode>
+ <truescore>0.0000000</truescore>
+ <truepenalty></truepenalty>
+ <truenextnode>-1</truenextnode>
+ <trueanswernote>1-3-T</trueanswernote>
+ <truefeedback format="html">
+ <text><![CDATA[<p>Please multiply the matrices. It looks like you have added them instead!</p>]]></text>
+ </truefeedback>
+ <falsescoremode>=</falsescoremode>
+ <falsescore>0.0000000</falsescore>
+ <falsepenalty></falsepenalty>
+ <falsenextnode>-1</falsenextnode>
+ <falseanswernote>1-3-F</falseanswernote>
+ <falsefeedback format="html">
+ <text></text>
+ </falsefeedback>
+ </node>
+ </prt>
+ <qtest>
+ <testcase>1</testcase>
+ <testinput>
+ <name>ans1</name>
+ <value>TA</value>
+ </testinput>
+ <expected>
+ <name>prt1</name>
+ <expectedscore>1.0000000</expectedscore>
+ <expectedpenalty>0.0000000</expectedpenalty>
+ <expectedanswernote>1-0-T </expectedanswernote>
+ </expected>
+ </qtest>
+ <qtest>
+ <testcase>2</testcase>
+ <testinput>
+ <name>ans1</name>
+ <value>TB</value>
+ </testinput>
+ <expected>
+ <name>prt1</name>
+ <expectedscore>0.0000000</expectedscore>
+ <expectedpenalty>0.1000000</expectedpenalty>
+ <expectedanswernote>1-1-T</expectedanswernote>
+ </expected>
+ </qtest>
+ <qtest>
+ <testcase>3</testcase>
+ <testinput>
+ <name>ans1</name>
+ <value>A+B</value>
+ </testinput>
+ <expected>
+ <name>prt1</name>
+ <expectedscore>0.0000000</expectedscore>
+ <expectedpenalty>0.1000000</expectedpenalty>
+ <expectedanswernote>1-3-T</expectedanswernote>
+ </expected>
+ </qtest>
+ <qtest>
+ <testcase>4</testcase>
+ <testinput>
+ <name>ans1</name>
+ <value>1</value>
+ </testinput>
+ <expected>
+ <name>prt1</name>
+ <expectedscore></expectedscore>
+ <expectedpenalty></expectedpenalty>
+ <expectedanswernote>NULL</expectedanswernote>
+ </expected>
+ </qtest>
+ <qtest>
+ <testcase>5</testcase>
+ <testinput>
+ <name>ans1</name>
+ <value>A</value>
+ </testinput>
+ <expected>
+ <name>prt1</name>
+ <expectedscore>0.0000000</expectedscore>
+ <expectedpenalty>0.1000000</expectedpenalty>
+ <expectedanswernote>1-3-F</expectedanswernote>
+ </expected>
+ </qtest>
+ </question>
+
+</quiz>
View
6 stack/cas/casstring.class.php
@@ -73,7 +73,7 @@ class stack_cas_casstring {
'CATCH', 'CLOSE', 'CLOSEFILE', 'COMPFILE', 'COMPILE', 'COMPILE_FILE',
'CURRENT_LET_RULE_PACKAGE', 'DATA_FILE_NAME', 'DEACTIVATE', 'DEBUGMODE',
'DEFINE', 'DEFINE_VARIABLE', 'DEMO', 'DEPENDENCIES', 'DESCRIBE', 'DIMACS_EXPORT',
- 'DIMACS_IMPORT', 'ERRCATCH', 'ERROR', 'ERROR_SIZE', 'ERROR_SYMS', 'ERRORMSG',
+ 'DIMACS_IMPORT', 'ENTERMATRIX', 'ERRCATCH', 'ERROR', 'ERROR_SIZE', 'ERROR_SYMS', 'ERRORMSG',
'EVAL_STRING', 'EXAMPLE', 'FEATURE', 'FEATUREP', 'FEATURES', 'FILE_NAME',
'FILE_OUTPUT_APPEND', 'FILE_SEARCH', 'FILE_SEARCH_DEMO', 'FILE_SEARCH_LISP',
'FILE_SEARCH_MAXIMA', 'FILE_TYPE', 'FILENAME_MERGE', 'FLENGTH', 'FORTINDENT',
@@ -102,8 +102,8 @@ class stack_cas_casstring {
/** @var array blacklist of CAS keywords forbidden to teachers. */
private static $teachernotallow = array('%UNITEXPAND', 'ABASEP', 'ABSBOXCHAR', 'ACTIVATE', 'ACTIVECONTEXTS', 'ADDITIVE', 'ADIM', 'AF', 'AFORM', 'AGD', 'ALG_TYPE', 'ALL_DOTSIMP_DENOMS', 'ALLSYM', 'ANTID', 'ANTIDIFF', 'ANTIDIFFERENCE', 'ANTISYMMETRIC', 'ARITHMETIC', 'ARITHSUM', 'ARRAY', 'ARRAYAPPLY', 'ARRAYINFO', 'ARRAYMAKE', 'ARRAYS', 'ASSOC_LEGENDRE_P', 'ASSOC_LEGENDRE_Q', 'ASYMBOL', 'ATENSIMP', 'ATOMGRAD', 'ATRIG1', 'ATVALUE', 'AUGMENTED_LAGRANGIAN_METHOD', 'AV', 'AXES', 'AXIS_3D', 'AXIS_BOTTOM', 'AXIS_LEFT', 'AXIS_RIGHT', 'AXIS_TOP', 'AZIMUT', 'BACKSUBST', 'BARS', 'BARSPLOT', 'BASHINDICES', 'BDVAC', 'BERLEFACT', 'BFPSI', 'BFPSI0', 'BIMETRIC', 'BODE_GAIN', 'BODE_PHASE', 'BORDER', 'BOUNDARIES_ARRAY', 'BOXPLOT', 'CANFORM', 'CANTEN', 'CBFFAC', 'CBRANGE', 'CBTICS', 'CDF_BERNOULLI', 'CDF_BETA', 'CDF_BINOMIAL', 'CDF_CAUCHY', 'CDF_CHI2', 'CDF_CONTINUOUS_UNIFORM', 'CDF_DISCRETE_UNIFORM', 'CDF_EXP', 'CDF_F', 'CDF_GAMMA', 'CDF_GEOMETRIC', 'CDF_GUMBEL', 'CDF_HYPERGEOMETRIC', 'CDF_LAPLACE', 'CDF_LOGISTIC', 'CDF_LOGNORMAL', 'CDF_NEGATIVE_BINOMIAL', 'CDF_NONCENTRAL_CHI2', 'CDF_NONCENTRAL_STUDENT_T', 'CDF_NORMAL', 'CDF_PARETO', 'CDF_POISSON', 'CDF_RANK_SUM', 'CDF_RAYLEIGH', 'CDF_SIGNED_RANK', 'CDF_STUDENT_T', 'CDF_WEIBULL', 'CDISPLAY', 'CENTRAL_MOMENT', 'CFRAME_FLAG', 'CGEODESIC', 'CHANGENAME', 'CHAOSGAME', 'CHEBYSHEV_T', 'CHEBYSHEV_U', 'CHECK_OVERLAPS', 'CHECKDIV', 'CHRISTOF', 'CLEAR_RULES', 'CMETRIC', 'CNONMET_FLAG', 'COGRAD', 'COLLAPSE', 'COLOR', 'COLORBOX', 'COLUMNS', 'COMBINATION', 'COMP2PUI', 'COMPONENTS', 'CONCAN', 'CONMETDERIV', 'CONSTVALUE', 'CONT2PART', 'CONTEXT', 'CONTEXTS', 'CONTINUOUS_FREQ', 'CONTORTION', 'CONTOUR', 'CONTOUR_LEVELS', 'CONTOUR_PLOT', 'CONTRACT_EDGE', 'CONTRAGRAD', 'CONTRIB_ODE', 'CONVERT', 'COORD', 'COPY_GRAPH', 'COR', 'COV', 'COV1', 'COVDIFF', 'COVERS', 'CREATE_LIST', 'CSETUP', 'CT_COORDS', 'CT_COORDSYS', 'CTAYLOR', 'CTAYPOV', 'CTAYPT', 'CTAYSWITCH', 'CTAYVAR', 'CTORSION_FLAG', 'CTRANSFORM', 'CTRGSIMP', 'CUNLISP', 'CV', 'DECLARE_CONSTVALUE', 'DECLARE_DIMENSIONS', 'DECLARE_FUNDAMENTAL_DIMENSIONS', 'DECLARE_FUNDAMENTAL_UNITS', 'DECLARE_QTY', 'DECLARE_TRANSLATED', 'DECLARE_UNIT_CONVERSION', 'DECLARE_UNITS', 'DECLARE_WEIGHTS', 'DECSYM', 'DEFAULT_LET_RULE_PACKAGE', 'DEFCON', 'DEFMATCH', 'DEFRULE', 'DELAY', 'DELETEN', 'DIAG', 'DIAGMATRIXP', 'DIAGMETRIC', 'DIM', 'DIMENSION', 'DIMENSIONLESS', 'DIMENSIONS', 'DIMENSIONS_AS_LIST', 'DIRECT', 'DISCRETE_FREQ', 'DISP', 'DISPCON', 'DISPFLAG', 'DISPFORM', 'DISPFUN', 'DISPJORDAN', 'DISPLAY', 'DISPLAY2D', 'DISPLAY_FORMAT_INTERNAL', 'DISPRULE', 'DISPTERMS', 'DISTRIB', 'DOMXEXPT', 'DOMXMXOPS', 'DOMXNCTIMES', 'DOTSIMP', 'DRAW', 'DRAW2D', 'DRAW3D', 'DRAW_FILE', 'DRAW_GRAPH', 'DRAW_GRAPH_PROGRAM', 'DSCALAR', 'EINSTEIN', 'ELAPSED_REAL_TIME', 'ELAPSED_RUN_TIME', 'ELE2COMP', 'ELE2POLYNOME', 'ELE2PUI', 'ELEM', 'ELEVATION', 'ELLIPSE', 'ENHANCED3D', 'ENTERMATRIX', 'ENTERTENSOR', 'ENTIER', 'EPS_HEIGHT', 'EPS_WIDTH', 'EV_POINT', 'EVFLAG', 'EVFUN', 'EVOLUTION', 'EVOLUTION2D', 'EVUNDIFF', 'EXPLICIT', 'EXPLOSE', 'EXPON', 'EXPOP', 'EXPT', 'EXSEC', 'EXTDIFF', 'EXTRACT_LINEAR_EQUATIONS', 'F90', 'FACTS', 'FAST_CENTRAL_ELEMENTS', 'FAST_LINSOLVE', 'FB', 'FILE_BGCOLOR', 'FILL_COLOR', 'FILL_DENSITY', 'FILLARRAY', 'FILLED_FUNC', 'FINDDE', 'FIX', 'FLIPFLAG', 'FLUSH', 'FLUSH1DERIV', 'FLUSHD', 'FLUSHND', 'FONT', 'FONT_SIZE', 'FORGET', 'FRAME_BRACKET', 'FUNDAMENTAL_DIMENSIONS', 'FUNDAMENTAL_UNITS', 'GAUSSPROB', 'GCDIVIDE', 'GCFAC', 'GD', 'GDET', 'GEN_LAGUERRE', 'GENSUMNUM', 'GEOMAP', 'GEOMETRIC', 'GEOMETRIC_MEAN', 'GEOSUM', 'GET', 'GET_PIXEL', 'GET_PLOT_OPTION', 'GET_TEX_ENVIRONMENT', 'GET_TEX_ENVIRONMENT_DEFAULT', 'GGF', 'GGFCFMAX', 'GGFINFINITY', 'GLOBAL_VARIANCES', 'GLOBALSOLVE', 'GNUPLOT_CLOSE', 'GNUPLOT_CURVE_STYLES', 'GNUPLOT_CURVE_TITLES', 'GNUPLOT_DEFAULT_TERM_COMMAND', 'GNUPLOT_DUMB_TERM_COMMAND', 'GNUPLOT_PM3D', 'GNUPLOT_REPLOT', 'GNUPLOT_RESET', 'GNUPLOT_RESTART', 'GNUPLOT_START', 'GOSPER', 'GOSPER_IN_ZEILBERGER', 'GOSPERSUM', 'GR2D', 'GR3D', 'GRADEF', 'GRADEFS', 'GRAPH6_DECODE', 'GRAPH6_ENCODE', 'GRAPH6_EXPORT', 'GRAPH6_IMPORT', 'GRID', 'GROBNER_BASIS', 'HARMONIC', 'HARMONIC_MEAN', 'HAV', 'HEAD_ANGLE', 'HEAD_BOTH', 'HEAD_LENGTH', 'HEAD_TYPE', 'HERMITE', 'HISTOGRAM', 'HODGE', 'IC_CONVERT', 'ICC1', 'ICC2', 'ICHR1', 'ICHR2', 'ICOUNTER', 'ICURVATURE', 'IDIFF', 'IDIM', 'IDUMMY', 'IDUMMYX', 'IEQN', 'IEQNPRINT', 'IFB', 'IFC1', 'IFC2', 'IFG', 'IFGI', 'IFR', 'IFRAME_BRACKET_FORM', 'IFRAMES', 'IFRI', 'IFS', 'IGEODESIC_COORDS', 'IGEOWEDGE_FLAG', 'IKT1', 'IKT2', 'IMAGE', 'IMETRIC', 'IMPLICIT', 'IMPLICIT_DERIVATIVE', 'INDEXED_TENSOR', 'INDICES', 'INFERENCE_RESULT', 'INFERENCEP', 'INFIX', 'INIT_ATENSOR', 'INIT_CTENSOR', 'INM', 'INMC1', 'INMC2', 'INPROD', 'INTERVALP', 'INTOPOIS', 'INVARIANT1', 'INVARIANT2', 'INVERT_BY_LU', 'IP_GRID', 'IP_GRID_IN', 'ISHOW', 'ISOLATE', 'ISOLATE_WRT_TIMES', 'ITEMS_INFERENCE', 'ITR', 'JACOBI_P', 'JF', 'JORDAN', 'JULIA', 'KDELS', 'KDELTA', 'KEY', 'KINVARIANT', 'KOSTKA', 'KT', 'KURTOSIS', 'KURTOSIS_BERNOULLI', 'KURTOSIS_BETA', 'KURTOSIS_BINOMIAL', 'KURTOSIS_CHI2', 'KURTOSIS_CONTINUOUS_UNIFORM', 'KURTOSIS_DISCRETE_UNIFORM', 'KURTOSIS_EXP', 'KURTOSIS_F', 'KURTOSIS_GAMMA', 'KURTOSIS_GEOMETRIC', 'KURTOSIS_GUMBEL', 'KURTOSIS_HYPERGEOMETRIC', 'KURTOSIS_LAPLACE', 'KURTOSIS_LOGISTIC', 'KURTOSIS_LOGNORMAL', 'KURTOSIS_NEGATIVE_BINOMIAL', 'KURTOSIS_NONCENTRAL_CHI2', 'KURTOSIS_NONCENTRAL_STUDENT_T', 'KURTOSIS_NORMAL', 'KURTOSIS_PARETO', 'KURTOSIS_POISSON', 'KURTOSIS_RAYLEIGH', 'KURTOSIS_STUDENT_T', 'KURTOSIS_WEIBULL', 'LABEL', 'LABEL_ALIGNMENT', 'LABEL_ORIENTATION', 'LAGUERRE', 'LASSOCIATIVE', 'LBFGS', 'LBFGS_NCORRECTIONS', 'LBFGS_NFEVAL_MAX', 'LC2KDT', 'LC_L', 'LC_U', 'LCHARP', 'LEGEND', 'LEGENDRE_P', 'LEGENDRE_Q', 'LEINSTEIN', 'LET', 'LET_RULE_PACKAGES', 'LETRAT', 'LETRULES', 'LETSIMP', 'LEVI_CIVITA', 'LFG', 'LG', 'LGTREILLIS', 'LI', 'LIEDIFF', 'LINDSTEDT', 'LINE_TYPE', 'LINE_WIDTH', 'LINEAR', 'LINEAR_PROGRAM', 'LINEAR_SOLVER', 'LISPDISP', 'LIST_CORRELATIONS', 'LIST_NC_MONOMIALS', 'LISTARRAY', 'LISTOFTENS', 'LOGAND', 'LOGCB', 'LOGOR', 'LOGX', 'LOGXOR', 'LOGY', 'LOGZ', 'LORENTZ_GAUGE', 'LPART', 'LRIEM', 'LRIEMANN', 'LSQUARES_ESTIMATES', 'LSQUARES_ESTIMATES_APPROXIMATE', 'LSQUARES_ESTIMATES_EXACT', 'LSQUARES_MSE', 'LSQUARES_RESIDUAL_MSE', 'LSQUARES_RESIDUALS', 'LTREILLIS', 'M1PBRANCH', 'MAINVAR', 'MAKE_ARRAY', 'MAKE_LEVEL_PICTURE', 'MAKE_POLY_CONTINENT', 'MAKE_POLY_COUNTRY', 'MAKE_POLYGON', 'MAKE_RANDOM_STATE', 'MAKE_RGB_PICTURE', 'MAKEBOX', 'MAKEORDERS', 'MANDELBROT', 'MAPERROR', 'MAT_FUNCTION', 'MAX_ORD', 'MAXAPPLYDEPTH', 'MAXAPPLYHEIGHT', 'MAXI', 'MAXIMIZE_LP', 'MAXNEGEX', 'MAXPOSEX', 'MAXPSIFRACDENOM', 'MAXPSIFRACNUM', 'MAXPSINEGINT', 'MAXPSIPOSINT', 'MAXTAYORDER', 'MAYBE', 'MEAN', 'MEAN_BERNOULLI', 'MEAN_BETA', 'MEAN_BINOMIAL', 'MEAN_CHI2', 'MEAN_CONTINUOUS_UNIFORM', 'MEAN_DEVIATION', 'MEAN_DISCRETE_UNIFORM', 'MEAN_EXP', 'MEAN_F', 'MEAN_GAMMA', 'MEAN_GEOMETRIC', 'MEAN_GUMBEL', 'MEAN_HYPERGEOMETRIC', 'MEAN_LAPLACE', 'MEAN_LOGISTIC', 'MEAN_LOGNORMAL', 'MEAN_NEGATIVE_BINOMIAL', 'MEAN_NONCENTRAL_CHI2', 'MEAN_NONCENTRAL_STUDENT_T', 'MEAN_NORMAL', 'MEAN_PARETO', 'MEAN_POISSON', 'MEAN_RAYLEIGH', 'MEAN_STUDENT_T', 'MEAN_WEIBULL', 'MEDIAN', 'MEDIAN_DEVIATION', 'MESH', 'MESH_LINES_COLOR', 'METRICEXPANDALL', 'MINI', 'MINIMALPOLY', 'MINIMIZE_LP', 'MINOR', 'MNEWTON', 'MOD_BIG_PRIME', 'MOD_TEST', 'MOD_THRESHOLD', 'MODE_CHECK_ERRORP', 'MODE_CHECK_WARNP', 'MODE_CHECKP', 'MODE_DECLARE', 'MODE_IDENTITY', 'MODEMATRIX', 'MODULAR_LINEAR_SOLVER', 'MON2SCHUR', 'MONO', 'MONOMIAL_DIMENSIONS', 'MULTI_ELEM', 'MULTI_ORBIT', 'MULTI_PUI', 'MULTINOMIAL', 'MULTSYM', 'NATURAL_UNIT', 'NC_DEGREE', 'NEGATIVE_PICTURE', 'NEWCONTEXT', 'NEWTON', 'NEWTONEPSILON', 'NEWTONMAXITER', 'NEXTLAYERFACTOR', 'NICEINDICES', 'NICEINDICESPREF', 'NM', 'NMC', 'NONCENTRAL_MOMENT', 'NONEGATIVE_LP', 'NONMETRICITY', 'NONZEROANDFREEOF', 'NOUNDISP', 'NP', 'NPI', 'NPTETRAD', 'NTERMST', 'NTICKS', 'NTRIG', 'NUMBERED_BOUNDARIES', 'ODE2', 'ODE_CHECK', 'ODELIN', 'OPTIMIZE', 'OPTIMPREFIX', 'OPTIONSET', 'ORBIT', 'ORBITS', 'ORTHOPOLY_RECUR', 'ORTHOPOLY_RETURNS_INTERVALS', 'ORTHOPOLY_WEIGHT', 'OUTOFPOIS', 'PALETTE', 'PARAMETRIC', 'PARAMETRIC_SURFACE', 'PARGOSPER', 'PARTPOL', 'PDF_BERNOULLI', 'PDF_BETA', 'PDF_BINOMIAL', 'PDF_CAUCHY', 'PDF_CHI2', 'PDF_CONTINUOUS_UNIFORM', 'PDF_DISCRETE_UNIFORM', 'PDF_EXP', 'PDF_F', 'PDF_GAMMA', 'PDF_GEOMETRIC', 'PDF_GUMBEL', 'PDF_HEIGHT', 'PDF_HYPERGEOMETRIC', 'PDF_LAPLACE', 'PDF_LOGISTIC', 'PDF_LOGNORMAL', 'PDF_NEGATIVE_BINOMIAL', 'PDF_NONCENTRAL_CHI2', 'PDF_NONCENTRAL_STUDENT_T', 'PDF_NORMAL', 'PDF_PARETO', 'PDF_POISSON', 'PDF_RANK_SUM', 'PDF_RAYLEIGH', 'PDF_SIGNED_RANK', 'PDF_STUDENT_T', 'PDF_WEIBULL', 'PDF_WIDTH', 'PEARSON_SKEWNESS', 'PERMUT', 'PERMUTATION', 'PETROV', 'PIC_HEIGHT', 'PIC_WIDTH', 'PICTURE_EQUALP', 'PICTUREP', 'PIECHART', 'PLOT2D', 'PLOT3D', 'PLOT_FORMAT', 'PLOT_OPTIONS', 'PLOT_REAL_PART', 'PLSQUARES', 'POCHHAMMER', 'POCHHAMMER_MAX_INDEX', 'POINT_SIZE', 'POINT_TYPE', 'POINTS', 'POINTS_JOINED', 'POLAR', 'POLAR_TO_XY', 'POLYGON', 'PREDERROR', 'PRIMEP_NUMBER_OF_TESTS', 'PRINTPROPS', 'PRODRAC', 'PRODUCT', 'PRODUCT_USE_GAMMA', 'PROGRAMMODE', 'PROPORTIONAL_AXES', 'PROPS', 'PROPVARS', 'PSEXPAND', 'PSI', 'PUI', 'PUI2COMP', 'PUI2ELE', 'PUI2POLYNOME', 'PUI_DIRECT', 'PUIREDUC', 'QRANGE', 'QTY', 'QUANTILE', 'QUANTILE_BERNOULLI', 'QUANTILE_BETA', 'QUANTILE_BINOMIAL', 'QUANTILE_CAUCHY', 'QUANTILE_CHI2', 'QUANTILE_CONTINUOUS_UNIFORM', 'QUANTILE_DISCRETE_UNIFORM', 'QUANTILE_EXP', 'QUANTILE_F', 'QUANTILE_GAMMA', 'QUANTILE_GEOMETRIC', 'QUANTILE_GUMBEL', 'QUANTILE_HYPERGEOMETRIC', 'QUANTILE_LAPLACE', 'QUANTILE_LOGISTIC', 'QUANTILE_LOGNORMAL', 'QUANTILE_NEGATIVE_BINOMIAL', 'QUANTILE_NONCENTRAL_CHI2', 'QUANTILE_NONCENTRAL_STUDENT_T', 'QUANTILE_NORMAL', 'QUANTILE_PARETO', 'QUANTILE_POISSON', 'QUANTILE_RAYLEIGH', 'QUANTILE_STUDENT_T', 'QUANTILE_WEIBULL', 'QUARTILE_SKEWNESS', 'RANDOM', 'RANDOM_BERNOULLI', 'RANDOM_BETA', 'RANDOM_BINOMIAL', 'RANDOM_BIPARTITE_GRAPH', 'RANDOM_CAUCHY', 'RANDOM_CHI2', 'RANDOM_CONTINUOUS_UNIFORM', 'RANDOM_DIGRAPH', 'RANDOM_DISCRETE_UNIFORM', 'RANDOM_EXP', 'RANDOM_F', 'RANDOM_GAMMA', 'RANDOM_GEOMETRIC', 'RANDOM_GRAPH', 'RANDOM_GRAPH1', 'RANDOM_GUMBEL', 'RANDOM_HYPERGEOMETRIC', 'RANDOM_LAPLACE', 'RANDOM_LOGISTIC', 'RANDOM_LOGNORMAL', 'RANDOM_NEGATIVE_BINOMIAL', 'RANDOM_NETWORK', 'RANDOM_NONCENTRAL_CHI2', 'RANDOM_NONCENTRAL_STUDENT_T', 'RANDOM_NORMAL', 'RANDOM_PARETO', 'RANDOM_PERMUTATION', 'RANDOM_POISSON', 'RANDOM_RAYLEIGH', 'RANDOM_REGULAR_GRAPH', 'RANDOM_STUDENT_T', 'RANDOM_TOURNAMENT', 'RANDOM_TREE', 'RANDOM_WEIBULL', 'RANGE', 'RATCHRISTOF', 'RATEINSTEIN', 'RATIONAL', 'RATPRINT', 'RATRIEMANN', 'RATWEYL', 'RATWTLVL', 'REARRAY', 'RECTANGLE', 'REDIFF', 'REDRAW', 'REDUCE_CONSTS', 'REDUCE_ORDER', 'REGION_BOUNDARIES', 'REGION_BOUNDARIES_PLUS', 'REMARRAY', 'REMCOMPS', 'REMCON', 'REMCOORD', 'REMLET', 'REMOVE_DIMENSIONS', 'REMOVE_FUNDAMENTAL_DIMENSIONS', 'REMOVE_FUNDAMENTAL_UNITS', 'REMPART', 'REMSYM', 'RENAME', 'RESOLVANTE', 'RESOLVANTE_ALTERNEE1', 'RESOLVANTE_BIPARTITE', 'RESOLVANTE_DIEDRALE', 'RESOLVANTE_KLEIN', 'RESOLVANTE_KLEIN3', 'RESOLVANTE_PRODUIT_SYM', 'RESOLVANTE_UNITAIRE', 'RESOLVANTE_VIERER', 'REVERT', 'REVERT2', 'RGB2LEVEL', 'RIC', 'RICCI', 'RIEM', 'RIEMANN', 'RINVARIANT', 'RK', 'ROT_HORIZONTAL', 'ROT_VERTICAL', 'SAVEFACTORS', 'SCATTERPLOT', 'SCURVATURE', 'SET_DRAW_DEFAULTS', 'SET_RANDOM_STATE', 'SET_TEX_ENVIRONMENT', 'SET_TEX_ENVIRONMENT_DEFAULT', 'SET_UP_DOT_SIMPLIFICATIONS', 'SETELMX', 'SETUNITS', 'SETUP_AUTOLOAD', 'SF', 'SHOWCOMPS', 'SIMILARITYTRANSFORM', 'SIMPLE_LINEAR_REGRESSION', 'SIMPLIFIED_OUTPUT', 'SIMPLIFY_PRODUCTS', 'SIMPLIFY_SUM', 'SIMPLODE', 'SIMPMETDERIV', 'SIMTRAN', 'SKEWNESS', 'SKEWNESS_BERNOULLI', 'SKEWNESS_BETA', 'SKEWNESS_BINOMIAL', 'SKEWNESS_CHI2', 'SKEWNESS_CONTINUOUS_UNIFORM', 'SKEWNESS_DISCRETE_UNIFORM', 'SKEWNESS_EXP', 'SKEWNESS_F', 'SKEWNESS_GAMMA', 'SKEWNESS_GEOMETRIC', 'SKEWNESS_GUMBEL', 'SKEWNESS_HYPERGEOMETRIC', 'SKEWNESS_LAPLACE', 'SKEWNESS_LOGISTIC', 'SKEWNESS_LOGNORMAL', 'SKEWNESS_NEGATIVE_BINOMIAL', 'SKEWNESS_NONCENTRAL_CHI2', 'SKEWNESS_NONCENTRAL_STUDENT_T', 'SKEWNESS_NORMAL', 'SKEWNESS_PARETO', 'SKEWNESS_POISSON', 'SKEWNESS_RAYLEIGH', 'SKEWNESS_STUDENT_T', 'SKEWNESS_WEIBULL', 'SOLVE_REC', 'SOLVE_REC_RAT', 'SOMRAC', 'SPARSE6_DECODE', 'SPARSE6_ENCODE', 'SPHERICAL_BESSEL_J', 'SPHERICAL_BESSEL_Y', 'SPHERICAL_HANKEL1', 'SPHERICAL_HANKEL2', 'SPHERICAL_HARMONIC', 'SPLIT', 'SQRTDENEST', 'SSTATUS', 'STAIRCASE', 'STARDISP', 'STATS_NUMER', 'STD', 'STD1', 'STD_BERNOULLI', 'STD_BETA', 'STD_BINOMIAL', 'STD_CHI2', 'STD_CONTINUOUS_UNIFORM', 'STD_DISCRETE_UNIFORM', 'STD_EXP', 'STD_F', 'STD_GAMMA', 'STD_GEOMETRIC', 'STD_GUMBEL', 'STD_HYPERGEOMETRIC', 'STD_LAPLACE', 'STD_LOGISTIC', 'STD_LOGNORMAL', 'STD_NEGATIVE_BINOMIAL', 'STD_NONCENTRAL_CHI2', 'STD_NONCENTRAL_STUDENT_T', 'STD_NORMAL', 'STD_PARETO', 'STD_POISSON', 'STD_RAYLEIGH', 'STD_STUDENT_T', 'STD_WEIBULL', 'STIRLING', 'STIRLING1', 'STIRLING2', 'STRINGDISP', 'STYLE', 'SUBSAMPLE', 'SUMMAND_TO_REC', 'SURFACE_HIDE', 'SYMMETRICP', 'TAB', 'TAKE_CHANNEL', 'TAKE_INFERENCE', 'TCONTRACT', 'TENSORKILL', 'TENTEX', 'TEST_MEAN', 'TEST_MEANS_DIFFERENCE', 'TEST_NORMALITY', 'TEST_PROPORTION', 'TEST_PROPORTIONS_DIFFERENCE', 'TEST_RANK_SUM', 'TEST_SIGN', 'TEST_SIGNED_RANK', 'TEST_VARIANCE', 'TEST_VARIANCE_RATIO', 'TEXPUT', 'TITLE', 'TOTALDISREP', 'TOTIENT', 'TPARTPOL', 'TR', 'TR_ARRAY_AS_REF', 'TR_BOUND_FUNCTION_APPLYP', 'TR_FILE_TTY_MESSAGESP', 'TR_FLOAT_CAN_BRANCH_COMPLEX', 'TR_FUNCTION_CALL_DEFAULT', 'TR_NUMER', 'TR_OPTIMIZE_MAX_LOOP', 'TR_SEMICOMPILE', 'TR_STATE_VARS', 'TR_WARN_BAD_FUNCTION_CALLS', 'TR_WARN_FEXPR', 'TR_WARN_MEVAL', 'TR_WARN_MODE', 'TR_WARN_UNDECLARED', 'TR_WARN_UNDEFINED_VARIABLE', 'TR_WARNINGS_GET', 'TR_WINDY', 'TRACEMATRIX', 'TRANSFORM_XY', 'TRANSPARENT', 'TREILLIS', 'TREINAT', 'TRIVIAL_SOLUTIONS', 'TUBE', 'TUBE_EXTREMES', 'TUTTE_GRAPH', 'UEIVECTS', 'UFG', 'UFORGET', 'UG', 'ULTRASPHERICAL', 'UNDIFF', 'UNIT_STEP', 'UNIT_VECTORS', 'UNITEIGENVECTORS', 'UNITP', 'UNITS', 'UNITVECTOR', 'UNKNOWN', 'UNORDER', 'URIC', 'URICCI', 'URIEM', 'URIEMANN', 'USE_FAST_ARRAYS', 'USERSETUNITS', 'UVECT', 'VAR', 'VAR1', 'VAR_BERNOULLI', 'VAR_BETA', 'VAR_BINOMIAL', 'VAR_CHI2', 'VAR_CONTINUOUS_UNIFORM', 'VAR_DISCRETE_UNIFORM', 'VAR_EXP', 'VAR_F', 'VAR_GAMMA', 'VAR_GEOMETRIC', 'VAR_GUMBEL', 'VAR_HYPERGEOMETRIC', 'VAR_LAPLACE', 'VAR_LOGISTIC', 'VAR_LOGNORMAL', 'VAR_NEGATIVE_BINOMIAL', 'VAR_NONCENTRAL_CHI2', 'VAR_NONCENTRAL_STUDENT_T', 'VAR_NORMAL', 'VAR_PARETO', 'VAR_POISSON', 'VAR_RAYLEIGH', 'VAR_STUDENT_T', 'VAR_WEIBULL', 'VECTOR', 'VERBOSE', 'VERS', 'WARNINGS', 'WEYL', 'WRONSKIAN', 'X_VOXEL', 'XAXIS', 'XAXIS_COLOR', 'XAXIS_SECONDARY', 'XAXIS_TYPE', 'XAXIS_WIDTH', 'XLABEL', 'XRANGE', 'XRANGE_SECONDARY', 'XTICS', 'XTICS_AXIS', 'XTICS_ROTATE', 'XTICS_ROTATE_SECONDARY', 'XTICS_SECONDARY', 'XTICS_SECONDARY_AXIS', 'XU_GRID', 'XY_FILE', 'XYPLANE', 'Y_VOXEL', 'YAXIS', 'YAXIS_COLOR', 'YAXIS_SECONDARY', 'YAXIS_TYPE', 'YAXIS_WIDTH', 'YLABEL', 'YRANGE', 'YRANGE_SECONDARY', 'YTICS', 'YTICS_AXIS', 'YTICS_ROTATE', 'YTICS_ROTATE_SECONDARY', 'YTICS_SECONDARY', 'YTICS_SECONDARY_AXIS', 'YV_GRID', 'Z_VOXEL', 'ZAXIS', 'ZAXIS_COLOR', 'ZAXIS_TYPE', 'ZAXIS_WIDTH', 'ZEILBERGER', 'ZEROA', 'ZEROB', 'ZLABEL', 'ZLANGE', 'ZRANGE', 'ZTICS', 'ZTICS_AXIS', 'ZTICS_ROTATE' );
- /** @var array blacklist of CAS keywords forbidden to students. */
- private static $studentallow = array('%C', '%E', '%GAMMA', '%I', '%K1', '%K2',
+ /** @var array CAS keywords ALLOWED by students. */
+ private static $studentallow = array('SETELMX', '%C', '%E', '%GAMMA', '%I', '%K1', '%K2',
'%PHI', '%PI', 'ABS', 'ABSINT', 'ACOS', 'ACOSH', 'ACOT', 'ACOTH', 'ACSC', 'ACSCH',
'ADDMATRICES', 'ADJOIN', 'AND', 'ASCII', 'ASEC', 'ASECH', 'ASIN', 'ASINH', 'ATAN',
'ATAN2', 'ATANH', 'AUGCOEFMATRIX', 'BELLN', 'BESSEL_I', 'BESSEL_J', 'BESSEL_K',

0 comments on commit f74dfb9

Please sign in to comment.
Something went wrong with that request. Please try again.