From: Chris S. <san...@us...> - 2006-02-16 12:16:39
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv515/lang/en/doc Modified Files: author_commonsyntax.php Log Message: Index: author_commonsyntax.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/author_commonsyntax.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** author_commonsyntax.php 12 Jan 2006 11:39:43 -0000 1.8 --- author_commonsyntax.php 16 Feb 2006 12:16:28 -0000 1.9 *************** *** 1,165 **** ! <?php ! /** ! * Every CAS system is unique, and they all have different input ! * syntaxs. This file describes some aliases that STACK uses to ! * sort out some of these problems. ! * ! * @package documentation ! * @subpackage Stack ! */ ! ! include_once("$stack_root/scripts/stackDoc.php"); ! ! ?> ! ! <h1>STACK commands</h1> ! ! <p>Every CAS system is unique, and they all have different a syntax for doing ! the amazing complex tasks they are asked to perform. ! Each CAS system uses a slightly different syntax, ! details of which are given in ! the invaluable <a href="Rosetta.pdf">Rosetta.pdf</a>. ! This makes moving from one to the other a difficult task. ! </p> ! <p>This document details functions defined in Maxima unique to STACK, and ! synonyms (or alias) which have been set ! up. ! </p> ! ! <p>This section contains details of basic functions, STACK specific functions ! and various ALIAS commands used by STACK to provide users of other CAS systems ! a more familiar command name. ! </p> ! ! <?php ! /** ! * ! */ ! include($stack_root.'/scripts/maxima/stackfun.php'); ! include($stack_root.'/scripts/stackAuthor.php'); ! ! ! /** ! * Displays a table of documentation on a type of CAS commands defined in STACK. ! * ! * @param $type The type of CAS commands. ! */ ! function disp_cas($type){ ! global $stack_cmd; ! ! 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"; ! } ! } ! echo "</table>\n"; ! ! } ! ! ?> ! ! <h2>Numbers</h2> ! ! <?php disp_cas('num') ?> ! ! <h2>Sets, lists and matrices</h2> ! ! <p> Lists are entered using brackets, eg <tt>[1,2,3]</tt>. These are native to Maxima. ! ! <?php disp_cas('list') ?> ! ! </p> ! ! <p> Sets are implemented using the Maxima package <tt>nset</tt> which is automatically loaded by STACK. ! See the <a href="maximadocs/maxdoc/nset.html">specific documentation</a>. ! Note that, in addtion to Maxima's use of <tt>set(a1,a2,...,an)</tt> ! to construct a set with members <em>a1,a2,...,an</em>, STACK allows the use of ! curly braces: <tt>{a1,a2,...,an}.</tt> ! </p> ! <p> Matrices are a standard part of Maxima, and are entered using a syntax like ! <tt>matrix([1,2,3],[x^2,y^2,z^2]);</tt> </p> ! <p><em>Warning!</em> Maxima uses "." to signify ! matrix multiplication, eg <tt>A.B</tt> However, <tt>A*B</tt> is also defined as pointwise ! multiplication. ! <!--the <tt>vect</tt> packagefor vector and tensor functions re-defines this to be a <em>commutative</em>operator with strange consequences. Do not use "." for multiplication, use <tt>*</tt>instead.</p> --> ! With all these things, if the student needs to enter something as an answer, consider setting the optional ! <?php stack_doc_dispstackqfield('SyntaxHint','stackOptions'); ?> ! ! <h2>Trig and "calculator" functions</h2> ! ! <p>Basic "calculator" functions would use their "natural" names. ! The angular measure is always assumed to be <em>radians</em>. This is in keeping with the ! CAS, but probably not best suited for more elementary school assessment. Similarly <tt>log</tt> is a natural logarithm. </p> ! ! <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> ! ! <h2>Algebra</h2> ! ! <?php disp_cas('algebra') ?> ! ! <h2>Random numbers</h2> ! ! <?php disp_cas('rand') ?> ! ! The syntax is as follows. ! <ol> ! <li>If <tt>x</tt> is an <em>integer</em> return an integer between 0 and <tt>x-1</tt>.</li> ! <li>If <tt>x</tt> is a <em>float</em> return a float in the range 0 to <tt>x</tt>. </li> ! <li>If <tt>x</tt> is a <em>list</em> return a randomly selected element.</li> ! <li>If <tt>x</tt> is a <em>matrix</em> then rand is applied to every element of this matrix, as above.</li> ! </ol> ! ! <p>For the purposes of learning and teaching, we do not need an algorithm which ! is statistically perfect. We are much more interested in simplicity, efficiency ! and reproducibility across platforms. Hence, we adopt a linear method.</p> ! ! <h2>Plots</h2> ! ! In STACK, the <tt>plot</tt> command has been defined to be a wrapper for Maxima's <tt>plot2d</tt> ! command. Try, for example the following. ! ! <pre>@plot(x^2,[x,-1,1])@</pre> ! ! You can add a second variable to control the axes. ! ! <pre>@plot(x^2,[x,-1,1],[y,0,2])@</pre> ! ! However, Maxima will not always allow you to get the axes you want. This is on the to-do list for STACK. ! ! To get many plots in one window, we need to define a list of functions. ! ! <pre>@plot([x^2,sin(x)],[x,-1,1])@</pre> ! ! This can be done with Maxima's ! <a href='maximadocs/maxdoc/maxima_38.html#IDX948'>MAKELIST</a> command ! <pre>@(p(k):=x^k,pl:makelist(p(k),k,1,5),plot(pl,[x,-1,1]))@</pre> ! ! <h2>Calculus and Analysis</h2> ! ! <?php disp_cas('calculus') ?> ! ! <h2>"Powers"</h2> ! ! <p>Maxima has a package called <tt>powers</tt>, which contains many useful functions. This is automatically ! loaded, and so the functions are available to the user. If you need to use these function within the ! Maxima application itself, you will need to <tt>load("powers")</tt> first.</p> ! ! <p>See also the <tt>format</tt> package, which is also available with its own ! <a href="scripts/maxima/format/format.pdf">documentation</a>.</p> ! ! ! <?php disp_cas('powers') ?> --- 1,166 ---- ! <?php ! /** ! * Every CAS system is unique, and they all have different input ! * syntaxs. This file describes some aliases that STACK uses to ! * sort out some of these problems. ! * ! * @package documentation ! * @subpackage Stack ! */ ! ! include_once("$stack_root/scripts/stackDoc.php"); ! ! ?> ! ! <h1>STACK commands</h1> ! ! <p>Every CAS system is unique, and they all have different a syntax for doing ! the amazing complex tasks they are asked to perform. ! Each CAS system uses a slightly different syntax, ! details of which are given in ! the invaluable <a href="Rosetta.pdf">Rosetta.pdf</a>. ! This makes moving from one to the other a difficult task. ! </p> ! <p>This document details functions defined in Maxima unique to STACK, and ! synonyms (or alias) which have been set ! up. ! </p> ! ! <p>This section contains details of basic functions, STACK specific functions ! and various ALIAS commands used by STACK to provide users of other CAS systems ! a more familiar command name. ! </p> ! ! <?php ! /** ! * ! */ ! include($stack_root.'/scripts/maxima/stackfun.php'); ! include($stack_root.'/scripts/stackAuthor.php'); ! ! ! /** ! * Displays a table of documentation on a type of CAS commands defined in STACK. ! * ! * @param $type The type of CAS commands. ! */ ! function disp_cas($type){ ! global $stack_cmd; ! ! 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"; ! } ! } ! echo "</table>\n"; ! ! } ! ! ?> ! ! <h2>Numbers</h2> ! ! <?php disp_cas('num') ?> ! ! <h2>Sets, lists and matrices</h2> ! ! <p> Lists are entered using brackets, eg <tt>[1,2,3]</tt>. These are native to Maxima. ! ! <?php disp_cas('list') ?> ! ! </p> ! ! <p> Sets are implemented using the Maxima package <tt>nset</tt> which is automatically loaded by STACK. ! See the <a href="maximadocs/maxdoc/nset.html">specific documentation</a>. ! Note that, in addtion to Maxima's use of <tt>set(a1,a2,...,an)</tt> ! to construct a set with members <em>a1,a2,...,an</em>, STACK allows the use of ! curly braces: <tt>{a1,a2,...,an}.</tt> ! </p> ! <p> Matrices are a standard part of Maxima, and are entered using a syntax like ! <tt>matrix([1,2,3],[x^2,y^2,z^2]);</tt> </p> ! <p><em>Warning!</em> Maxima uses "." to signify ! matrix multiplication, eg <tt>A.B</tt> However, <tt>A*B</tt> is also defined as pointwise ! multiplication. ! <!--the <tt>vect</tt> packagefor vector and tensor functions re-defines this to be a <em>commutative</em>operator with strange consequences. Do not use "." for multiplication, use <tt>*</tt>instead.</p> --> ! With all these things, if the student needs to enter something as an answer, consider setting the optional ! <?php stack_doc_dispstackqfield('SyntaxHint','stackOptions'); ?> ! ! <h2>Trig and "calculator" functions</h2> ! ! <p>Basic "calculator" functions would use their "natural" names. ! The angular measure is always assumed to be <em>radians</em>. This is in keeping with the ! CAS, but probably not best suited for more elementary school assessment. Similarly <tt>log</tt> is a natural logarithm. </p> ! ! <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='#DDDDDD'> <td> <b> </b> </td> <td><tt>log10(x)</tt> </td> <td> Log to the base 10. (Support for this is not native in Maxima and this is a patch)</td></tr> ! <tr bgcolor='#DDDDFF'> <td> <b> </b> </td> <td><tt>sqrt(x)</tt> </td> <td> Square root.</td></tr> ! </table> ! ! <h2>Algebra</h2> ! ! <?php disp_cas('algebra') ?> ! ! <h2>Random numbers</h2> ! ! <?php disp_cas('rand') ?> ! ! The syntax is as follows. ! <ol> ! <li>If <tt>x</tt> is an <em>integer</em> return an integer between 0 and <tt>x-1</tt>.</li> ! <li>If <tt>x</tt> is a <em>float</em> return a float in the range 0 to <tt>x</tt>. </li> ! <li>If <tt>x</tt> is a <em>list</em> return a randomly selected element.</li> ! <li>If <tt>x</tt> is a <em>matrix</em> then rand is applied to every element of this matrix, as above.</li> ! </ol> ! ! <p>For the purposes of learning and teaching, we do not need an algorithm which ! is statistically perfect. We are much more interested in simplicity, efficiency ! and reproducibility across platforms. Hence, we adopt a linear method.</p> ! ! <h2>Plots</h2> ! ! In STACK, the <tt>plot</tt> command has been defined to be a wrapper for Maxima's <tt>plot2d</tt> ! command. Try, for example the following. ! ! <pre>@plot(x^2,[x,-1,1])@</pre> ! ! You can add a second variable to control the axes. ! ! <pre>@plot(x^2,[x,-1,1],[y,0,2])@</pre> ! ! However, Maxima will not always allow you to get the axes you want. This is on the to-do list for STACK. ! ! To get many plots in one window, we need to define a list of functions. ! ! <pre>@plot([x^2,sin(x)],[x,-1,1])@</pre> ! ! This can be done with Maxima's ! <a href='maximadocs/maxdoc/maxima_38.html#IDX948'>MAKELIST</a> command ! <pre>@(p(k):=x^k,pl:makelist(p(k),k,1,5),plot(pl,[x,-1,1]))@</pre> ! ! <h2>Calculus and Analysis</h2> ! ! <?php disp_cas('calculus') ?> ! ! <h2>"Powers"</h2> ! ! <p>Maxima has a package called <tt>powers</tt>, which contains many useful functions. This is automatically ! loaded, and so the functions are available to the user. If you need to use these function within the ! Maxima application itself, you will need to <tt>load("powers")</tt> first.</p> ! ! <p>See also the <tt>format</tt> package, which is also available with its own ! <a href="scripts/maxima/format/format.pdf">documentation</a>.</p> ! ! ! <?php disp_cas('powers') ?> |