konsoletyper / teavm

Compiles Java bytecode to JavaScript, WebAssembly and C
https://teavm.org
Apache License 2.0
2.55k stars 260 forks source link

Extend BigInteger with xValueExact() and sqrt() #880

Closed tryone144 closed 5 months ago

tryone144 commented 5 months ago

This PR improves the coverage of java.math.BigInteger by adding the missing byteValueExact(), shortValueExact(), intValueExact(), and longValueExact() methods, as well as an implementation for calculating the square root sqrt().

In addition, the constant value TWO which has been added in Java 9, is added as well.