PreviousUpNext

14.2.14  Integer

The standard library Integer api defines access to indefinite-precision integer functions and facilities.

The Integer api is implemented by the integer package.

The Integer api source code is in src/lib/std/src/integer.api, which is a proxy for src/lib/std/src/integer-guts.pkg.

See also: Int.

The above information is manually maintained and may contain errors.

api {    Int  = Int;
    precision : Null_Or(tagged_int::Int );
    min_int : Null_Or(Int );
    max_int : Null_Or(Int );
    to_large : Int -> Int;
    from_large : Int -> Int;
    to_int : Int -> tagged_int::Int;
    from_int : tagged_int::Int -> Int;
    _! : Int -> Int;
    -_ : Int -> Int;
    neg : Int -> Int;
    + : (Int , Int) -> Int;
    - : (Int , Int) -> Int;
    * : (Int , Int) -> Int;
    / : (Int , Int) -> Int;
    % : (Int , Int) -> Int;
    quot : (Int , Int) -> Int;
    rem : (Int , Int) -> Int;
    min : (Int , Int) -> Int;
    max : (Int , Int) -> Int;
    abs : Int -> Int;
    sign : Int -> tagged_int::Int;
    same_sign : (Int , Int) -> Bool;
    > : (Int , Int) -> Bool;
    >= : (Int , Int) -> Bool;
    < : (Int , Int) -> Bool;
    <= : (Int , Int) -> Bool;
    compare : (Int , Int) -> Order;
    to_string : Int -> String;
    from_string : String -> Null_Or(Int );
    scan : number_string::Radix
           -> number_string::Reader((Char, X) ) -> number_string::Reader((Int, X) );
    format : number_string::Radix -> Int -> String;
    is_prime : Int -> Bool;
    factors : Int -> List(Int );
    sum : List(Int ) -> Int;
    product : List(Int ) -> Int;
    div_mod : (Int , Int) -> (Int , Int);
    quot_rem : (Int , Int) -> (Int , Int);
    pow : (Int , tagged_int::Int) -> Int;
    log2 : Int -> tagged_int::Int;
    bitwise_or : (Int , Int) -> Int;
    bitwise_xor : (Int , Int) -> Int;
    bitwise_and : (Int , Int) -> Int;
    bitwise_not : Int -> Int;
    << : (Int , Unt) -> Int;
    >>> : (Int , Unt) -> Int;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext