Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

integer

integer

integer -- abstract ancestor of integer numbers

integer is the abstract ancestor of integer numbers that provides operations
from numeric plus a devision remainder operation %, bitwise logical operations,
shift operations and gcd. Also, integers can be used to build fractions.

Functions

convert this to a decimal number in a string. If negative, add "-" as
the first character.

redefines:

convert this to a number using the given base. If negative, add "-" as
the first character.
§as_string(len i32, base u32)
 => 
String
:
Any 
convert this to a number using the given base. If negative, add "-" as
the first character. Extend with leading "0" until the length is at
least len
bitwise operations
division remainder

redefines:

shift operations
test divisibility by other
bitwise NOT
bitwise NOT (Unicode alias)
check if this type of integer is bounded

returns false unless redefined by a specific implementation of integer
greatest common divisor of this and b

note that this assumes zero to be divisible by any positive integer.
create a fraction
create a fraction via unicode fraction slash \u2044 '⁄ '
create binary representation
create binary representation with given number of digits.
create octal representation
create octal representation with given number of digits.
create decimal representation
create decimal representation with given number of digits.
create hexadecimal representation
create hexadecimal representation with given number of digits.