Index of /~gesslein/mathomatic_source_browsing
Name Last modified Size Description
Parent Directory -
AUTHORS 25-May-2009 07:58 640
COPYING 31-Oct-2005 22:19 26K
INSTALL.txt 26-Jun-2009 21:22 2.2K
VERSION 24-Jun-2009 15:29 7
altproto.h 13-May-2009 10:26 1.3K
am.c 23-Jun-2009 18:06 20K
am.h 25-May-2009 08:46 5.7K
changes.txt 30-Jun-2009 10:29 20K Mathomatic changelog
cmds.c 27-Jun-2009 10:55 66K
compile.secure 24-Jun-2009 22:30 613
complex.c 09-Jun-2009 19:59 8.4K
complex.h 01-Feb-2009 15:30 667
complex_lib.c 23-Jun-2009 09:41 2.3K
diff.c 23-Jun-2009 09:23 21K
doc/ 21-Jun-2009 12:12 -
externs.h 02-Jun-2009 07:00 2.2K
factor.c 16-Apr-2009 14:22 26K
factor_int.c 24-Jun-2009 14:53 11K
factorial/ 30-Apr-2009 08:05 -
gcd.c 12-Jun-2009 05:32 6.6K
globals.c 22-Jun-2009 15:12 6.1K
help.c 27-Jun-2009 09:43 20K
icons/ 26-Apr-2009 07:04 -
includes.h 20-Jun-2009 18:00 1.4K
integrate.c 17-Apr-2009 11:54 21K
lib/ 12-Jun-2009 04:15 -
license.h 08-Jun-2009 06:04 1.5K
list.c 30-Jun-2009 06:07 24K
m4/ 02-May-2009 06:24 -
main.c 11-Jun-2009 07:26 11K
makefile 24-Jun-2009 22:38 4.8K
makefile.cygwin 13-May-2009 10:28 892
makefile.lib 13-May-2009 10:27 1.1K
mathomatic.1 15-Jun-2009 13:36 5.2K
mathomatic.rc 10-Apr-2008 13:38 430
misc/ 24-Jun-2009 09:58 -
parse.c 31-May-2009 10:37 17K
poly.c 24-Jun-2009 05:10 52K
primes/ 20-Jun-2009 17:53 -
proto.h 27-Jun-2009 11:13 10K
simplify.c 25-Jun-2009 08:27 57K
solve.c 01-Feb-2009 15:30 31K
super.c 27-Jun-2009 11:13 11K
tests/ 30-Jun-2009 18:41 -
unfactor.c 28-May-2009 04:54 15K
update 14-May-2009 07:14 577
zipsrc 10-Apr-2009 20:46 594
Mathomatic
by
George Gesslein II
This archive contains the complete C source code and documentation for
Mathomatic, the automatic algebraic manipulator. Using the included
makefiles, this text mode application should compile with gcc and run
correctly under Unix, Linux, Mac OS X, and Cygwin, without any modifications.
Most of the Mathomatic code can also be called from any C or C++ program,
when linked with Mathomatic specially compiled as a symbolic math library.
Mathomatic is a portable Computer Algebra System (CAS) and calculator
software that can symbolically solve, simplify, and compare algebraic
equations, perform real number, complex number, and polynomial arithmetic,
etc. It does some calculus and is very easy to compile and use.
Mathomatic and all software and documentation in this archive are copyrighted
and made available under the GNU Lesser General Public License (LGPL) version
2.1 (see file "COPYING"). This means Mathomatic is free to distribute and
comes with no warranty at all, but if you find any bugs in the software or
algorithms, I will try to fix them.
Compilation
-----------
This section can be skipped; you may wish to jump to the next section with
short compile/install instructions, or read the file "INSTALL.txt", if you
only wish to install Mathomatic.
To compile under Mac OS X, Xcode Tools should be installed, which contains
the GNU C compiler and make utility. Xcode Tools is available on one of the
Mac OS X installation discs. To open a shell window, click on the "Terminal"
application in "Applications/Utilities".
To compile Mathomatic without readline support, type "make" at a shell prompt
while in the Mathomatic source directory. This will compile the C source
code to create the executable file named "mathomatic". To run Mathomatic,
type "./mathomatic" at the shell prompt. No other files are needed to run
Mathomatic.
To test most functionality, type:
make test
To recompile with readline editing and history of all Mathomatic input, type:
make clean
make READLINE=1
This allows use of the cursor keys to recall and edit previously entered and
pushed expressions when running Mathomatic. The GNU readline library must be
installed to use readline.
To create the secure version of Mathomatic, with no file I/O nor shelling out
possible, type:
./compile.secure
This will create the executable "mathomatic_secure", which can safely be used
as a telnet application or CGI program. The "mathomatic -s" command line
option functions similarly, though is not as secure.
Installation
------------
A typical installation is done by typing the following at the shell prompt:
make READLINE=1
make test
sudo make install
This will compile the source code, verify the functionality of the generated
executable (named "mathomatic"), and install the executable, docs, and tests
in "/usr/local" in less than a minute. If you like, use "make m4install"
instead of "make install", to install m4 Mathomatic also, which are shell
scripts named "matho" and "rmath". m4 (macro) Mathomatic allows easy entry
of math functions like sqrt(x) and sin(x) as macros. "matho" runs m4
Mathomatic without readline support and "rmath" runs "matho" with a readline
front end, if the "rlwrap" program is available.
There are quite a few math goodies in this archive, besides the main
Mathomatic program:
The directory "icons" contains Mathomatic icons for your desktop.
The directory "doc" contains the Mathomatic documentation in HTML.
The directory "tests" contains Mathomatic test and example scripts.
The directory "primes" contains a prime number generator utility, etc.
The directory "lib" contains the API and test for the Mathomatic library.
The directory "m4" contains m4 Mathomatic supporting files.
The directory "misc" contains a polynomial equation solver utility.
For quick help while running Mathomatic, type "?" or use the help command.
To read or print the documentation, point your web browser to the file
"doc/index.html", or "/usr/local/share/doc/mathomatic/html/index.html" if
Mathomatic was installed. When copying the Mathomatic documentation, please
copy the entire html directory, not just selected files from it.
For the most recent source code, binaries, documentation, information, and
other help, please visit the Mathomatic website: http://mathomatic.org
This README was written by George Gesslein II, author and maintainer of
Mathomatic.
Contact information:
email:
georgegesslein@gmail.com
postal address:
George Gesslein II
43 Atwater Road
Lansing, New York 14882
USA
The author is happy to help friendly people with any problems using this
software. If you get stuck, send email to him.
Please report suspected bugs in Mathomatic on the Ubuntu Launchpad website:
"http://launchpad.net/mathomatic". Mathomatic should always give correct
answers; if not, report it.
Compile-time defines for the Mathomatic source code
---------------------------------------------------
To compile Mathomatic for UNIX, GNU/Linux, Mac OS X, or any POSIX compliant
OS, define "UNIX" (see "makefile"). To compile Mathomatic for a generic
system, simply compile with no defines. To compile for Microsoft Windows
using Cygwin, define only "CYGWIN" (see "makefile.cygwin"). To compile for
hand-helds like the Nintendo DS, define "HANDHELD" and "SECURE" for greatly
reduced memory usage and no file I/O.
Define "READLINE" and include the readline libraries at link time to use
readline mode. This will allow easy command line editing and history. The
GNU readline development package must be installed to compile with this
option and the readline library must be installed to run the resulting
executable.
Define "SILENT" to remove all helpful messages, warnings, and debugging code.
This is useful when using Mathomatic in another program or if you only want
terse output. The Mathomatic command "set debug -1" is another way to not
display helpful messages and warnings.
Define "LIBRARY" when using the Mathomatic code as a symbolic math library.
"SILENT" is automatically defined when this is defined. Most standard input
and output is disabled. See the directory "lib" and the file "makefile.lib"
for the library hooks (API) and test program and how to compile it. The
following commands are omitted with this option: calculate, edit, optimize,
pause, quit, and tally.
Define "SECURE" to disable all file reading, writing, and executing. This is
useful when making Mathomatic available to the public through telnet or CGI
programs. It is also useful when making ROMable code. All insecure commands
and code are omitted with this option. See "compile.secure", which is the
secure Mathomatic build script.
Define "TIMEOUT_SECONDS" to set the maximum number of seconds Mathomatic may
run. Upon timeout, Mathomatic properly exits. This is useful when making
Mathomatic a telnet or CGI program, so it won't overload the server.
The "I18N" define is meant to enable internationalization using gettext(3),
however the actual code to do this has not been implemented, so do not define
"I18N" until it is. Currently all strings to be translated have been marked,
but no translations have been made, so Mathomatic is only available in
English.
To see which of the above defines were used in a compiled version of
Mathomatic, use the version command.
Mathomatic C source code files
------------------------------
altproto.h - alternate proto.h, made by hand
am.h - the main include file for Mathomatic, contains tunable parameters
complex.h - floating point complex number arithmetic function prototypes
externs.h - global variable extern definitions, from globals.c
includes.h - automatically includes all necessary include files
license.h - the current Mathomatic license
proto.h - global function prototypes, made with cproto utility
am.c - miscellaneous C functions for Mathomatic
cmds.c - code for commands that don't belong anywhere else
complex.c - floating point complex number routines for Mathomatic
complex_lib.c - generic floating point complex number arithmetic library
diff.c - symbolic differentiation routines and related commands
factor.c - symbolic factorizing routines (not polynomial factoring)
factor_int.c - floating point constant factorizing routines
gcd.c - floating point GCD and numerical fractions code
globals.c - global variable and array definitions, duped in externs.h
help.c - command table, help command, and input parsing routines
integrate.c - integration routines and commands
list.c - expression and equation display routines
main.c - startup code for Mathomatic, not used for library
parse.c - mathematical expression parsing routines
poly.c - simplifying and polynomial routines
simplify.c - simplifying routines
solve.c - symbolic solving routines
super.c - group and combine denominators of symbolic fractions
unfactor.c - symbolic unfactorizing (expanding) routines