asciimathcalculator.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>ASCIIMath Calculator Demo</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  7. <script type="text/javascript" src="ASCIIMathML.js"></script>
  8. <!--script type="text/javascript">mathfontsize=".9em"</script-->
  9. <style type="text/css">
  10. #menu, #title, #subtitle, #author {text-align: center}
  11. body {font-family: Arial; background-color:beige}
  12. p,table {font-family: Times}
  13. </style>
  14. </head>
  15. <body>
  16. <div id="menu">
  17. | <a href="asciimath.html">Home Page</a> |
  18. <a href="asciimathsyntax.html">Syntax</a> |
  19. <a href="asciimathdemo.html">Try it</a> |
  20. <a href="asciimathcalculator.html">Calculator</a> |
  21. <a href="http://mathcs.chapman.edu/~jipsen/mathml/asciimathdownload.html">Download</a> |
  22. <a href="http://mathcs.chapman.edu/~jipsen/math/index.php/ASCIIMathML/ASCIIMathGraphs.html">Graphs</a> |
  23. <a href="http://mathcs.chapman.edu/~jipsen/math/index.php/ASCIIMathML/ASCIIMathFAQ.html">ASCIIMath FAQ</a> |
  24. <a href="http://mathcs.chapman.edu/~jipsen/math/index.php/ASCIIMathML/ASCIIMathMLSandbox.html">Sandbox</a> |
  25. <a href="http://mathcs.chapman.edu/~jipsen/math/index.php/ASCIIMathML/ASCIIMathCommentsAndSuggestions.html">Comments</a> |
  26. </div>
  27. <hr/>
  28. <h2 id="title">
  29. ASCIIMath Scientific Calculator (ver 1.2)
  30. </h2>
  31. <h4 align="center">
  32. A free webpage calculator with live MathML display
  33. </h4>
  34. <h4 align="center">
  35. This page requires Internet Explorer 6+<a
  36. href="http://www.dessci.com/en/products/mathplayer">MathPlayer</a>
  37. or Mozilla/Firefox/Netscape 7+.
  38. </h4>
  39. <div class="ASCIIMathCalculator"></div>
  40. <p>
  41. More calculator areas:<br>
  42. <textarea id="in1" rows="2" cols="40" onkeyup="calculate('in1','out1')">
  43. 2sin^-1(1)</textarea> &nbsp; <span id="out1"></span>
  44. <p/>
  45. <p>
  46. <textarea id="in2" rows="2" cols="30"
  47. onkeyup="calculate('in2','out2');calculate('in3','out3')">
  48. a=5; b=4; c=-1; (-b+sqrt(b^2-4a*c))/(2a)
  49. </textarea> &nbsp; <span id="out2"></span>
  50. <br/>
  51. <textarea id="in3" rows="1" cols="30"
  52. onkeyup="calculate('in2','out2');calculate('in3','out3')">
  53. (-b-sqrt(b^2-4a*c))/(2a)</textarea> &nbsp; <span id="out3"></span>
  54. </p>
  55. <p>
  56. <b>Note that this is dynamic HTML running locally on your machine.</b>
  57. <br/>
  58. Right-click on the output to copy or view the MathML code (or have it
  59. <b>spoken</b> in IE+MathPlayer).
  60. </p>
  61. <p>
  62. <b>Some technical remarks:</b> This calculator works only in radians.
  63. (Multiply angles by pi/180 to convert from degrees to radians.)
  64. <br/>
  65. The syntax is loosely based on JavaScript and a subset of ASCIIMathML.
  66. <br/>
  67. The multiplication symbol * can be omitted after a digit (0-9)
  68. or a closing parenthesis.
  69. <br/>
  70. Available constants and functions:
  71. <br/>
  72. &nbsp; &nbsp; +, -, *, /, ^, pi, e, sqrt(), ln(), abs(), sign(),
  73. floor(), ceil(), n!, C(n,k), ran(a,b,n)
  74. <br/>
  75. &nbsp; &nbsp; sin(), cos(), tan(), sin^-1(), cos^-1(), tan^-1(),
  76. sinh(), cosh(), tanh(), sinh^-1(), cosh^-1(), tanh^-1()
  77. <br/>
  78. &nbsp; &nbsp; sec(), csc(), cot(), sec^-1(), csc^-1(), cot^-1(),
  79. sech(), csch(), coth(), sech^-1(), csch^-1(), coth^-1()
  80. <br/>
  81. Values can be assigned to (legal JavaScript) variable names.
  82. Use ";" to separate expressions.
  83. <br/>
  84. Any number of calculator textareas can be placed anywhere on <b>your own</b>
  85. webpages.
  86. </p>
  87. ASCIIMathML and this calculator are freely available under the
  88. <a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General
  89. Public License</a>. Please include a link to <a
  90. href="http://asciimathml.sourceforge.net">asciimathml.sourceforge.net</a>
  91. on any webpage that makes use of them, and send a link of your webpage
  92. to <a href="mailto:jipsen@chapman.edu">jipsen@chapman.edu</a>.
  93. <hr/>
  94. <div id="author">
  95. <a href="http://www.chapman.edu/~jipsen/">Peter Jipsen</a>,
  96. <a href="http://www.chapman.edu/">Chapman University</a>, May 2007
  97. <a href="http://validator.w3.org/check/referer"><img border="0"
  98. src="http://www.w3.org/Icons/valid-html401"
  99. alt="Valid HTML 4.01!" height="31" width="88"></a>
  100. </div>
  101. </body>
  102. </html>