Hi all, I had an idea: create Rational, Bigrational and Complex(not done yet) classes in Java to allow exact computation - get rid of rounding errors. Rational can be initialized in various ways, for example using String; after the end of the computation, there are toDecimal methods, to print result as a decimal or BigDecimal in the case of BigRational. Ther is no overflow check, so we have to make a decision which class to use. Code as usually
on github. Enjoy!
No comments:
Post a Comment