Mathomatic Explained

Mathomatic
Mathomatic
Author:George Gesslein II
Developer:George Gesslein II
Discontinued:Yes
Latest Release Version:16.0.5
Service Name:Mathomatic
Language:English
Programming Language:C
Engine:GitHub
Operating System:Cross-platform, Unix-like
Platform:Any computer architecture
Genre:Computer algebra/math system
License:GNU Lesser General Public License version 2.1

Mathomatic[1] is a free, portable, general-purpose computer algebra system (CAS) that can symbolically solve, simplify, combine and compare algebraic equations, and can perform complex number, modular, and polynomial arithmetic, along with standard arithmetic. It can perform symbolic calculus (derivative, extrema, Taylor series, and polynomial integration and Laplace transforms), numerical integration, and can handle all elementary algebra except logarithms. Trigonometric functions can be entered and manipulated using complex exponentials, with the GNU m4 preprocessor. Not currently implemented are general functions such as f(x), arbitrary-precision and interval arithmetic, as well as matrices.

Features

Mathomatic is capable of solving, differentiating, simplifying, calculating, and visualizing elementary algebra. It also can perform summations, products, and automated display of calculations of any length by plugging sequential or test values into any formula, then approximating and simplifying before display.

Intermediate results (showing the work) may be displayed by previously typing "set debug 1" (see the session example); this works for solving and almost every command in Mathomatic. "set debug 2" shows more details about the work done.

The software does not include a GUI except with the Mathomatic trademark authorized, versions for smartphones and tablets running iOS or Android. The Mathomatic software, available on the official Mathomatic website, is authorized for use in any other type of software, due to its permissive free software license (GNU LGPL). It is available as a free software library, and as a free console mode application that uses a color command-line interface with pretty-print output that runs in a terminal emulator under any operating system. The console interface is simple and requires learning the basic algebra notation to start. All input and output is line-at-a-time ASCII text. By default, input is standard input and output is standard output. Mathomatic is typically compiled with editline or GNU readline for easier input.

There is no programming capability; the interpreter works like an algebraic calculator. Expressions and equations are entered in standard algebraic infix notation. Operations are performed on them by entering simple English commands.

Because all numeric arithmetic is double precision floating point, and round-off error is not tracked, Mathomatic is not suitable for applications requiring high precision, such as astronomical calculations. It is useful for symbolic-numeric calculations of about 14 decimal digits accuracy, although many results will be exact, if possible.

Mathomatic can be used as a floating point or integer arithmetic code generating tool, simplifying and converting equations into optimized assignment statements in the Python, C, and Java programming languages. The output can be made compatible with most other mathematics programs, except TeX and MathML format input/output are currently not available. The ASCII characters that are allowed in Mathomatic variable names is configurable, allowing TeX format variable names.

The Mathomatic source code can be compiled as a symbolic math library with an API, which can be linked to C compatible programs that need to use the Mathomatic symbolic math engine.

Session examples

Solving and code generation example, where the work is shown:

1-> x = (a+1)*(b+2)

#1: x = (a + 1)*(b + 2)

1-> set debug 1
Success.
1-> solve for b
level 1: x = (a + 1)*(b + 2)
Subtracting "(a + 1)*(b + 2)" from both sides of the equation:
level 1: x - ((a + 1)*(b + 2)) = 0
Subtracting "x" from both sides of the equation:
level 1: -1*(a + 1)*(b + 2) = -1*x
Dividing both sides of the equation by "-1":
level 1: (a + 1)*(b + 2) = x
Dividing both sides of the equation by "a + 1":
level 1: b + 2 = x/(a + 1)
Subtracting "2" from both sides of the equation:
level 1: b = (x/(a + 1)) - 2
Solve completed:
level 1: b = (x/(a + 1)) - 2
Solve successful:

           x
#1: b = ------- - 2
        (a + 1)

1-> code C ; output C programming language code
b = ((x/(a + 1.0)) - 2.0);
1-> variables C ; define the variables for the C compiler
double x;
double a;
double b;
1->

History

Development of Mathomatic was started in the year 1986 by George Gesslein II, as an experiment in computerized mathematics.[2] It was originally written in Microsoft C for MS-DOS. Versions 1 and 2 were published by Dynacomp of Rochester, New York in 1987[3] and 1988[4] as a scientific software product for DOS. Afterwards it was released as shareware and then emailware, with a 2D equation graphing program. At the turn of the century, Mathomatic was ported to the GNU C Compiler under Linux and became free software. The graphing program was discontinued; 2D/3D graphing of equations is now accomplished with gnuplot.

The name "Mathomatic" is a portmanteau of "math" and "automatic",[5] and was inspired by the naming and automation of Rog-O-Matic, which was an early experiment in artificial intelligence.

Development has ceased as a result of the death of the author on February 24, 2013.[6]

Available platforms

Mathomatic is available for almost all platforms, including Microsoft Windows using MinGW.[7] It is available for Mac OS X,[8] [9] for iOS,[10] for Android,[11] and for the Nintendo DS under DSLinux and stand-alone.[12] Fedora Linux,[13] Slackware,[14] Debian,[15] Ubuntu,[16] Gentoo Linux,[17] and all of the main BSD Unix distributions[18] [19] [20] include Mathomatic as an automatically installable package. There is a port to JavaScript using Emscripten, allowing Mathomatic to run in a web browser.[21] The ports are all maintained by separate individuals.

Requirements

Building from source requires a C compiler with the standard POSIX C libraries. If Mathomatic is compiled with the GCC C compiler or the Tiny C Compiler for a Unix-like operating system, no changes need to be made to the source code. Mathomatic uses no compiler-specific code, so it will usually compile easily with any C compiler. Use of the Mathomatic Symbolic Math Library allows mixing programming languages and is operating system independent.[22]

Mathomatic can be ported to any computer with at least 1 megabyte of free RAM. The Mathomatic standard distribution[23] memory requirement defaults to a maximum of 400 megabytes, depending on the size of the equation spaces and how many expressions have been entered. Equation spaces are fixed size arrays that are allocated as needed, the size of which is set during compilation or startup. Each algebraic expression or equation entered at the main prompt is stored in an equation space.

Mathomatic is written to do most symbolic manipulations with memory moves, like an assembly language program. This causes Mathomatic to crash when used with the new LLVM backend, which doesn't seem to like the standard C library function memmove(3). To use Mathomatic with a C compiler that uses an LLVM backend, disable all optimizations with "-O0" on the C compiler command line. Otherwise the regression tests will loop endlessly. This is most certainly an optimization bug in LLVM. To help those trying to debug this optimization error, Mathomatic will fail when LLVM optimizes the simplification of (32^.5) to 4*(2^.5), and the like, going into an endless loop every time.

See also

References

External links

Notes and References

  1. Web site: Mathomatic - Free Software Directory . 2023-02-28 . directory.fsf.org.
  2. Web site: Mathomatic User Guide . George Gesslein II . 29 June 2012 . Official Mathomatic documentation (history) . 13 July 2012 . 22 July 2012 . https://web.archive.org/web/20120722141638/http://www.mathomatic.org/math/doc/manual.html#history . dead .
  3. https://books.google.com/books?id=6UgqAAAAMAAJ&q=mathomatic&dq=mathomatic&cd=2 The Software catalog: Microcomputer
  4. https://books.google.com/books?id=iewsAQAAIAAJ&q=mathomatic&dq=mathomatic&cd=1 Intelligent instruments & computer
  5. Web site: Mathomatic User Guide . George Gesslein II . 29 June 2012 . Official Mathomatic documentation . 13 July 2012 . 22 July 2012 . https://web.archive.org/web/20120722141638/http://www.mathomatic.org/math/doc/manual.html#introduction . dead .
  6. Web site: 2021-11-06. George John Gesslein II. Ithaca Journal. 2013-02-26.
  7. http://mathomatic.org/math/download.html#Windows Mathomatic MS-Windows port
  8. http://mathomatic.org/math/download.html#MacOSX Mathomatic Mac OS X port
  9. http://trac.macports.org/browser/trunk/dports/math/mathomatic Mathomatic Mac OS X port from MacPorts
  10. https://itunes.apple.com/app/mathomatic/id300926436?mt=8 Mathomatic for iOS
  11. https://play.google.com/store/apps/details?id=com.mathomatic Mathomatic for Android
  12. http://blog.davr.org/category/nintendo-ds/mathomatic/ Mathomatic ported to the Nintendo DS
  13. https://archive.today/20121220210608/https://admin.fedoraproject.org/updates/mathomatic The Mathomatic package in Fedora
  14. http://slackbuilds.org/result/?search=mathomatic&sv= Official Slackware port of Mathomatic in SlackBuilds
  15. http://packages.debian.org/mathomatic All Mathomatic packages in Debian
  16. https://launchpad.net/ubuntu/+source/mathomatic All Mathomatic packages in Ubuntu Linux
  17. http://packages.gentoo.org/package/sci-mathematics/mathomatic Gentoo Packages /package/sci-mathematics/mathomatic
  18. https://archive.today/20121220231356/http://www.openbsd.org/cgi-bin/cvsweb/ports/math/mathomatic/ OpenBSD CVS tree for Mathomatic
  19. http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/math/mathomatic/ NetBSD pkgsrc CVS tree for Mathomatic
  20. http://www.freebsd.org/cgi/cvsweb.cgi/ports/math/mathomatic/ FreeBSD CVS tree for Mathomatic
  21. Web site: Mathomatic in JavaScript . 2013-08-04 . dead . https://web.archive.org/web/20140114032120/https://blenheimears.com/mathomatic/ . 14 January 2014.
  22. Web site: Mathomatic User Guide . George Gesslein II . 29 June 2012 . Official Mathomatic documentation (developer info) . 13 July 2012 . 22 July 2012 . https://web.archive.org/web/20120722141638/http://www.mathomatic.org/math/doc/manual.html#developer . dead .
  23. http://www.mathomatic.org Found on the Mathomatic website