# BigInteger

opaque type BigInteger

### Big Integer

BigInteger is an opaque value holding java.math.BigInteger

BigInteger is used for really large integer calculations

``````val max: BigInteger = ~~(58).repeat(35).foldAs(1.Big)(_ * _)

"Largest Bitcoin address= " + max + ", digits=" + max.toString.length tp()

val TenB = 10.Big * 1000 * 1000 * 1000
val YearSecs = 60.Big * 60 * 24 * 365

"Suppose, there is 10 billion computers in the world capable counting 10 billion numbers per second each" tp()
"  Together they will count " + (TenB * TenB) + " in a second" tp()
"  Together they will count " + (TenB * TenB * YearSecs) + " in a year" tp()
"  Together they will count " + (TenB * TenB * YearSecs * TenB) + " in 10 billions years - the 'Age of Universe'" tp()
"It is required "   +   (max / ((TenB * TenB * YearSecs * TenB))) + " 'Ages of Universe'" tp()
"for all todays computers together to just simply count all Bitcoin adresses" tp()

// Output ****************************************************************************************************************
Suppose, there is 10 billion computers in the world capable counting 10 billion numbers per second each
Together they will count 100000000000000000000 in a second
Together they will count 3153600000000000000000000000 in a year
Together they will count 31536000000000000000000000000000000000 in 10 billions years - the 'Age of Universe'
It is required 1664076041000527808478341 'Ages of Universe'
for all todays computers together to just simply count all Bitcoin adresses
``````
Source
BigInteger.scala

## Def

@scala.annotation.targetName("remainder")
inline def %(inline v: Long | BigInteger): BigInteger
@scala.annotation.targetName("multiply")
inline def *(inline v: Long | BigInteger): BigInteger
@scala.annotation.targetName("plus")
inline def +(inline v: Long | BigInteger): BigInteger
@scala.annotation.targetName("minus")
inline def -(inline v: Long | BigInteger): BigInteger
@scala.annotation.targetName("divide")
inline def /(inline v: Long | BigInteger): BigInteger
@scala.annotation.targetName("less")
inline def <(inline v: Long | BigInteger): Boolean
@scala.annotation.targetName("lessOrEqual")
inline def <=(inline v: Long | BigInteger): Boolean
@scala.annotation.targetName("greater")
inline def >(inline v: Long | BigInteger): Boolean
@scala.annotation.targetName("greaterOrEqual")
inline def >=(inline v: Long | BigInteger): Boolean
inline def abs
inline def Long: Long
inline def Number: java.math.BigInteger
inline def real: java.math.BigInteger

Real value

Real value

Returns real value standing behind the opaque type

Inherited from
_methods
Source
Type.scala
inline def sign: Int
inline def unary_-