Skip to content

A modularised Java library with functionality: for fixed point and arbitrary precision arithmetic; matrices; getting prime numbers; and, generating pseudorandom numbers.

License

Notifications You must be signed in to change notification settings

agdturner/ccg-math

Repository files navigation

Description

A modular Java library dependent on and complimenting BigMath with functionality for:

  • arbitrary precision arithmetic;

  • matrix calculations;

  • handling prime numbers

  • Generating pseudorandom numbers numbers.

  • For many arithmetic calculations, the user specifies an Order of Magnitude for the precision of results. If a result cannot be precisely and accurately represented, then it is rounded to the given Order of Magnitude. BigMath arithmetic is slightly different in that it focusses on users specifying a precision (rather than a scale), so BigMath is geared for computing calculations accurate to a specified number of significant figures.

Latest versioned release

Developed and tested on Java Development Kit, version 15.

<!-- https://mvnrepository.com/artifact/io.github.agdturner/ccg-math -->
<dependency>
    <groupId>io.github.agdturner</groupId>
    <artifactId>ccg-math</artifactId>
    <version>2.0</version>
</dependency>

JAR

Example

See ccg-math-example for an example of how to set up and use the library.

Notes

Math_BigRational is based on BigRational, but has been slightly modified. Mostly this was to make it serializable. The library is dependent on both ccg-io and big-math

Development plans/ideas

  • Conduct some computational comparisons, e.g. compare Math_BigDecimal.sqrt(BigDecimal, int, RoundingMode), BigDecimal.sqrt(MathContext) and BigDecimalMath.sqrt().
  • Generalise Math_BigRationalSqrt for nth roots.
  • Create a pseudo random number generator for BigInteger.
  • Develop functionality for processing complex numbers where the real and imaginary parts are stored as Math_BigRational.
  • Generally improve the coverage of unit tests.
  • Consider developing more functionality for symbolic computation.

Development history

New in 2.0

New in 1.9

New in 1.8

Origins

  • Early versions of this code were bundled together with lots of other code developed for academic research projects. A separation of code produced agdt-java-generic a generic higher level library upon which this depends. Since Version 1.7 an attempt is being made to provide a summary of changes for each version released on Maven Central.

Contributions

  • Welcome.

LICENCE

Acknowledgements and thanks

  • The University of Leeds and externally funded research grants have supported the development of this library.
  • Thank you openJDK contributors and all involved in creating the platform.
  • Thank you Eric for the BigMath library.
  • Thank you developers and maintainers of other useful Java libraries that provide inspiration.
  • Thank you developers and maintainers of Apache Maven, Apache NetBeans, and git which I use for developing code.
  • Thank you developers and maintainers of GitHub for supporting the development of this code and for providing a means of creating a community of users and developers.
  • Thank you developers, maintainers and contributors of relevent content on: -- Wikimedia projects, in particular the English language Wikipedia -- StackExchange, in particular StackOverflow and Math.StackExchange.
  • Information that has helped me develop this library is cited in the source code.
  • Thank you to those that supported me personally and all who have made a positive contribution to society. Let us try to look after each other, look after this world, make space for wildlife, and engineer knowledge :)

About

A modularised Java library with functionality: for fixed point and arbitrary precision arithmetic; matrices; getting prime numbers; and, generating pseudorandom numbers.

Topics

Resources

License

Stars

Watchers

Forks

Languages