This module provides an arbitrary-precision integer numeric type.
The type Whole is a first-class numeric type and support all the usual mathematical operations:
Whole i = wholeNumber(12P); Whole j = wholeNumber(3); Whole n = i**j + j; print(n); //prints 1728000000000000000000000000000000000003
Packages | |
ceylon.whole | Arbitrary precision integer arithmetic. T |
Dependencies | ||
java.base (jvm) | 7 |
Arbitrary precision integer arithmetic. The focus of this
package is the Whole
type which performs calculations
using arbitrary precision integer arithmetic. An instance
of Whole
may be obtained by calling wholeNumber()
or
parseWhole()
.
Values | |
one | Source Codeshared Whole one A |
two | Source Codeshared Whole two A |
zero | Source Codeshared Whole zero A |
Functions | |
formatWhole | Source Codeshared String formatWhole(Whole whole, Integer radix = ..., Character? groupingSeparator = null) Parameters:
|
gcd | Source Codeshared Whole gcd(Whole first, Whole second) The greatest common divisor. |
parseWhole | Source Codeshared Whole? parseWhole(String string, Integer radix = ...) The Parameters:
Throws
See also formatWhole() |
wholeNumber | Source Codeshared Whole wholeNumber(Integer number) Throws
|
Interfaces | |
Whole | Source Codeshared Whole An arbitrary precision integer. |