https://kotlinlang.org logo
Title
u

user

07/22/2022, 5:21 AM
convert biginteger to bit I am stuck with an exercise at JetBrain Academy, with BigInteger(Kotlin). I should write a code snippet to convert a (BigInteger) number of exbibyte into bits: if the input is 1 as BigInteger, it displays 9223372036854775808. In the hints it says I should use pow(63).(Exbibyte = 2^63 = 9 223 372 036 854 775 808‬ Bit) My problem is if I use pow(), I can use only double as the biggest range. But with double I cannot display a BigInteger number.