Skip to content

nurk/bigdecimalCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

Bigdecimal Calculator

Heavily inspired by https://sites.google.com/site/drjohnbmatthews/enumerated-functions

When you need to perform calculations of formulas that require a higher precision than a double, you can still write it as a formula instead of using bigDecimal chaining.

Example:

BigDecimal result = BigDecimalCalculator.calculate(String.format("((%s - %s) / %s) * (%s + %s)", "2", 1d, 1L, 2, BigDecimal.ONE.toPlainString()), 30, HALF_UP);

This gives the following result: 3.000000000000000000000000000000

About

BigDecimal Calculator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages