struct Nota::Integer

Overview

Nota::Integer represents an arbitrary size nota-encoded integer.

The representation is intended for data transfer and thus is not suitable for arithmetic operations. To use the value it should be converted to an integer type of suitable size (u8..u128, i8..i128, or BigInt).

Defined in:

nota/integer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(num : Int) #

[View source]

Instance Method Detail

def bit_length : Int32 #

[View source]
def negative? : Bool #

[View source]
def to_big_i : BigInt #

[View source]
def to_i : Int32 #

[View source]
def to_i128 : Int128 #

[View source]
def to_i16 : Int16 #

[View source]
def to_i32 : Int32 #

[View source]
def to_i64 : Int64 #

[View source]
def to_i8 : Int8 #

[View source]
def to_u : UInt32 #

[View source]
def to_u128 : UInt128 #

[View source]
def to_u16 : UInt16 #

[View source]
def to_u32 : UInt32 #

[View source]
def to_u64 : UInt64 #

[View source]
def to_u8 : UInt8 #

[View source]