Rational Numbers
Go+ has various rational number types including bigint, bigrat and bigfloat. Here are a few basic examples on bigint type.
Declaration and assignment of bigint type variables
The Go+ language uses the keyword “var” to declare variables.
the integer rational variable can be assigned when declaration. (1r<<65), the value is equal to the 65th power of 2.
Notice:
The initial value of a rational variable without assignment is not 0 but <nil>
.
Expected results:
bint1: <nil>
bint2: <nil>
bint3: 36893488147419103232
Next example: If/Else