BBPFormula calculated by BigDecmals... problem with overflowing double solved, but it is very slow. I am going to look on better algorithms for calculating modular exponentiation. I also think that I forget how to commit only one file, so I hope this will be fine