From: Chris S. <san...@us...> - 2005-11-08 09:41:50
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6131/lang/en/doc Modified Files: author_commonsyntax.php author_testsuite.php en_doc.php Log Message: Changes to implement simp:false in the code. A major update. Index: author_testsuite.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/author_testsuite.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** author_testsuite.php 26 Sep 2005 10:15:34 -0000 1.12 --- author_testsuite.php 8 Nov 2005 09:41:39 -0000 1.13 *************** *** 41,45 **** $testsuite[] = stack_testsuite_construct('AlgEquiv','4^(-1/2)','1/2',1,'','Numbers'); $testsuite[] = stack_testsuite_construct('AlgEquiv','4^(1/2)','sqrt(4)',1,'',''); ! $testsuite[] = stack_testsuite_construct('AlgEquiv','0.5','1/2',0,'','Mix of floats and rational numbers'); $testsuite[] = stack_testsuite_construct('AlgEquiv','0.333333333333333','1/3',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','SQRT(-1)','%I',1,'','Powers and roots'); --- 41,45 ---- $testsuite[] = stack_testsuite_construct('AlgEquiv','4^(-1/2)','1/2',1,'','Numbers'); $testsuite[] = stack_testsuite_construct('AlgEquiv','4^(1/2)','sqrt(4)',1,'',''); ! $testsuite[] = stack_testsuite_construct('AlgEquiv','0.5','1/2',1,'','Mix of floats and rational numbers'); $testsuite[] = stack_testsuite_construct('AlgEquiv','0.333333333333333','1/3',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','SQRT(-1)','%I',1,'','Powers and roots'); *************** *** 131,135 **** $testsuite[] = stack_testsuite_construct('FacForm','2*(x+1)','2*x-2',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*x+2','2*x-2',0,'x',''); ! $testsuite[] = stack_testsuite_construct('FacForm','2*(x+0.5)','2*x+1',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','t*(2*x+1)','t*(2*x+1)',1,'x','Linear factors'); $testsuite[] = stack_testsuite_construct('FacForm','t*x+t','t*(x+1)',0,'x',''); --- 131,135 ---- $testsuite[] = stack_testsuite_construct('FacForm','2*(x+1)','2*x-2',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*x+2','2*x-2',0,'x',''); ! $testsuite[] = stack_testsuite_construct('FacForm','2*(x+0.5)','2*x+1',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','t*(2*x+1)','t*(2*x+1)',1,'x','Linear factors'); $testsuite[] = stack_testsuite_construct('FacForm','t*x+t','t*(x+1)',0,'x',''); *************** *** 157,161 **** $testsuite[] = stack_testsuite_construct('FacForm','%i*(x-2)','(%i*x-2*%i)',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x-%i)*(x+%i)','x^2+1',1,'x',''); ! //$testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x+(1+sqrt(3)*%i)/2)*(x+(1-sqrt(3)*%i)/2)','x^3-1',1,'x',''); --- 157,161 ---- $testsuite[] = stack_testsuite_construct('FacForm','%i*(x-2)','(%i*x-2*%i)',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x-%i)*(x+%i)','x^2+1',1,'x',''); ! $testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x+(1+sqrt(3)*%i)/2)*(x+(1-sqrt(3)*%i)/2)','x^3-1',1,'x',''); *************** *** 187,191 **** $testsuite[] = stack_testsuite_construct('SA_factored','(1-x)^2','(x-1)^2',1,'x',''); ! $testsuite[] = stack_testsuite_construct('SA_expanded','1/0','0',1,'',''); $testsuite[] = stack_testsuite_construct('SA_expanded','x^2-1','0',1,'',''); $testsuite[] = stack_testsuite_construct('SA_expanded','(x-1)*(x+1)','0',0,'',''); --- 187,191 ---- $testsuite[] = stack_testsuite_construct('SA_factored','(1-x)^2','(x-1)^2',1,'x',''); ! $testsuite[] = stack_testsuite_construct('SA_expanded','1/0','0',0,'',''); $testsuite[] = stack_testsuite_construct('SA_expanded','x^2-1','0',1,'',''); $testsuite[] = stack_testsuite_construct('SA_expanded','(x-1)*(x+1)','0',0,'',''); Index: author_commonsyntax.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/author_commonsyntax.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** author_commonsyntax.php 7 Oct 2005 06:26:38 -0000 1.5 --- author_commonsyntax.php 8 Nov 2005 09:41:39 -0000 1.6 *************** *** 49,58 **** echo "<table>\n"; foreach ($stack_cmd as $fun => $vals) { if ($type == $vals['type']) { ! echo "<tr><td nowrap='nowrap' align='top'><b><a NAME=\"STACK_command_$fun\">$fun</a></b></td> ! <td nowrap='nowrap' align='top'><tt>{$vals['syntax']}</tt></td> ! <td>{$vals['doc']}</td></tr>\n"; } } --- 49,61 ---- echo "<table>\n"; + $trcol = FALSE; foreach ($stack_cmd as $fun => $vals) { + $trcol = !$trcol; if ($type == $vals['type']) { ! if ($trcol) { echo "\n<tr bgcolor='#DDDDDD'>\n"; } else { echo "\n<tr bgcolor='#DDDDFF'>\n"; } ! echo "\n <td nowrap='nowrap' align='top'><b><a NAME=\"STACK_command_$fun\">$fun</a></b></td>"; ! echo "\n <td nowrap='nowrap' align='top'><tt>{$vals['syntax']}</tt></td>"; ! echo "\n <td>{$vals['doc']}</td></tr>\n"; } } *************** *** 97,106 **** <table> ! <tr> <td> <b>Trig </b> </td> <td><tt>sin(x), cos(x), tan(x)</tt></td> <td> The angular measure is always assumed to be <em>radians</em>.</td> </tr> ! <tr> <td> <b>Inverse trig </b> </td> <td><tt>asin(x)</tt> etc</td> <td> The angular measure is always assumed to be <em>radians</em>. These functions are displayed as sin<sup>-1</sup>(x) etc.</td> </tr> ! <tr> <td> <b>Hyperbolic </b> </td> <td><tt>sinh(x), cosh(x), tanh(x)</tt></td></tr> ! <tr> <td> <b>Logarithms </b> </td> <td><tt>log(x), exp(x)</tt> </td> <td> Natural logarithms, and exponential function.</td></tr> ! <tr> <td> <b> </b> </td> <td><tt>ln(x)</tt> </td> <td> Natural logarithm.</td></tr> ! <tr> <td> <b> </b> </td> <td><tt>sqrt(x)</tt> </td> <td> Square root.</td></tr> </table> --- 100,109 ---- <table> ! <tr bgcolor='#DDDDDD'> <td> <b>Trig </b> </td> <td><tt>sin(x), cos(x), tan(x)</tt></td> <td> The angular measure is always assumed to be <em>radians</em>.</td> </tr> ! <tr bgcolor='#DDDDFF'> <td> <b>Inverse trig </b> </td> <td><tt>asin(x)</tt> etc</td> <td> The angular measure is always assumed to be <em>radians</em>. These functions are displayed as sin<sup>-1</sup>(x) etc.</td> </tr> ! <tr bgcolor='#DDDDDD'> <td> <b>Hyperbolic </b> </td> <td><tt>sinh(x), cosh(x), tanh(x)</tt></td><td> </td></tr> ! <tr bgcolor='#DDDDFF'> <td> <b>Logarithms </b> </td> <td><tt>log(x), exp(x)</tt> </td> <td> Natural logarithms, and exponential function.</td></tr> ! <tr bgcolor='#DDDDDD'> <td> <b> </b> </td> <td><tt>ln(x)</tt> </td> <td> Natural logarithm.</td></tr> ! <tr bgcolor='#DDDDFF'> <td> <b> </b> </td> <td><tt>sqrt(x)</tt> </td> <td> Square root.</td></tr> </table> Index: en_doc.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/en_doc.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** en_doc.php 26 Sep 2005 10:15:34 -0000 1.11 --- en_doc.php 8 Nov 2005 09:41:39 -0000 1.12 *************** *** 249,252 **** --- 249,278 ---- with approximations being used."; + $stackOptions['Simplify']['doc']="This option is used to set the Maxima variable <tt>simp</tt>. + This variable controls automatic simplifications. It makes sense this to set + this to <tt>true</tt> to ensure that all variables set by the teacher are simplified. + For very elementry questions set this to <tt>false</tt>. + This variable is set before the question variables, and all CASText fields are instantated. + It is also set once the AnswerTest is about to be applied. The student's answer is always + displayed with <tt>simp:false</tt>, to prevent automatic simplification. + + <p>To turn simplification on and off use the respective assignements + <pre> + simp = true + simp = false</pre> + in the Question Variables, and other fields. If you want to evaluate a variable with + simplifiactions at a later point in a question (eg in the Teacher's Answer) you can use + <pre> + ev(p,simp) + </pre> + where <tt>p</tt> is the variable to be simplified.</p> + + <p><font color='red'>Be warned!</font> When simplification is switched off Maxima treates + expressions such as <tt>1+x</tt> and <tt>x+1</tt> as different. While tests like AlgEquiv turn + simplification <em>on</em>, other tests do not.</p> + + <p>There are currently no intermediate stages between <tt>simp=true</tt> and <tt>simp=false</tt>. + This is an area of active research."; + $stackOptions['Language']['doc']="This determines the language used for STACK."; *************** *** 303,311 **** $stackAnswerTest['AlgEquiv']['doc']="This is full algebraic simplification, as ! far as is possible within the computer algebra system. This is a ! basic test, available to all CAS systems, and is the default test. In essence we take <tt>StudentAnswer-TeacherAnswer</tt> and shake it around in as many ways as possible. If the result is zero ! we return true."; $stackAnswerTest['AlgEquiv_quiet']['doc']="This is identical to the answer test --- 329,338 ---- $stackAnswerTest['AlgEquiv']['doc']="This is full algebraic simplification, as ! far as is possible within the computer algebra system. This is the default test. In essence we take <tt>StudentAnswer-TeacherAnswer</tt> and shake it around in as many ways as possible. If the result is zero ! we return true. This test will cope with expressions as well as ! equations, inequalities, sets, lists and matrices. This test disregards whether ! simplification is switched on, it always fully simplifies all its arguments."; $stackAnswerTest['AlgEquiv_quiet']['doc']="This is identical to the answer test *************** *** 314,319 **** $stackAnswerTest['CASEqual']['doc']="This is test if the CAS returns TRUE when asked to evaluate <tt>StudentAnswer=TeacherAnswer</tt> as a Boolean. ! There is no explicit simplification here (unlike AlgEquiv) and so this is ! very much at the mercy of the CAS system being used."; $stackAnswerTest['Num_tol_relative']['doc']="This is test checks to --- 341,346 ---- $stackAnswerTest['CASEqual']['doc']="This is test if the CAS returns TRUE when asked to evaluate <tt>StudentAnswer=TeacherAnswer</tt> as a Boolean. ! There is no explicit simplification here (unlike AlgEquiv). This test works ! in different ways depending on whether simplifiation is on."; $stackAnswerTest['Num_tol_relative']['doc']="This is test checks to |