RaffMath is the Mathematics library I have written for educational and personal use. It has been been worked on in bits of my free time since I was 17, up until the end of my junior year when I was 20. It has reached an acceptable quality in which it may be of use to other people. I have recently chosen to begin work on new side projects, so I am shelving this one indefinitely. 

RaffMath is not a computer algebra system, thought that functionality could be added at a later time. This library has the goals of accuracy, arbitrary precision, ease of use, and programmability. My library is not like any currently available math library, and takes a different approach to programing mathematics - taking easy to learn and hard to master to heart, allowing for novices to catch on quickly, and experts organize powerful operations and optimizations.

My library currently works in this way, with one main interface: ArbitraryPrecision. From this, ArbitraryPrecision, RealNumberComplexNumber, and Equation are extended. In this way, basic mathematical operations that are true for whatever one is working on, whether it exist in the real or complex plane, or be an entire Equation, can be treated in just that way, true no mater the input. The mathematical libraries for most common functions, are in implemented in static methods, and may request knowledge about a mathematical constant with an implementation of the Constant interface.

In turn, Equation objects are generated by an EquationFactory which allows the programmer to pass a String representation, which can contain custom functions and arbitrary variables, and it will all be handled and converted. This allows the focus to remain on the math and less on the programing. This is done through a Function class, that serves as a wrapper for implementations and gives the Equation object and EquationFactory enough knowledge to parse strings and handle new, user defined Functions. The EquationFactory already knows how to handle anything that implements theConstant interface.

In short, an overview of what my library is capable of:

  • A default implementation for arbitrary precision numbers (meaning infinitely many decimal places or size, so long as your hardware can handle it)
  • A default handling of complex numbers
  • An Equation object, that allows the use of entire functions and equations with variables and the ability to perform operations on them easily
  • An Equation Factory, that allows the programmer to override almost anything they could ever need or add additional functionality easily, with minimal work
    • Equation Factory is capable of automatically handling constants like π (~3.14) and e (~2.718) to provide easier input.
    • It can also automatically convert shorthand for characters with mathematical meaning into the desired character; such as converting "sum" to Σ.
  • Support for all trigonometric, hyperbolic functions, roots, and powers
  • Support for some Calculus operations (definite integrals, derivatives at 'x', Simpson's rule, and some more)
  • Support for some Matrix operations (determinant, LU & QR factorization, and some more).
  • A visitor pattern allows for custom behavior with an Equation object, 2 visitors are already implemented
    • A LaTeX converter, that will output a LaTeX string
    • A Image converter, that will output an image rendering of the Equation.

Please remember, this software is beta and is developed in my free time. However if you would like to use it for personal or educational use, please feel free and let me know of any bugs / improvements / typos! Downloading my library includes the jar itself, with a small main method (try it out!), tutorials of a few features, and the javadocs for my library.

The download page is here, you will need to agree to my license to download it. This is to protect my work, if there is something you would like to use my software for that my license says is forbidden, send me an email! I would be glad to let you use it.