This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.math.BigDecimal; | |
| import java.math.MathContext; | |
| int digits = 11; | |
| MathContext mc = new MathContext(digits*digits + 1); | |
| BigDecimal c = new BigDecimal(0.25); | |
| BigDecimal hundred = new BigDecimal(100); | |
| BigDecimal e = BigDecimal.ONE.divide(hundred.pow(digits-1), mc); | |
| BigDecimal z = BigDecimal.ZERO; | |
| int iterations = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class stack: | |
| def __init__(self, *data): | |
| self.data = [*data] | |
| def push(self, data): | |
| self.data.append(data) | |
| def pop(self): |