## int.api
# Compiled by:
#
src/lib/std/src/standard-core.sublibstipulate
package mwi = multiword_int; # multiword_int is from
src/lib/std/types-only/basis-structs.pkgherein
# This api is implemented in:
#
#
src/lib/std/src/tagged-int-guts.pkg #
src/lib/std/src/one-word-int-guts.pkg #
src/lib/std/src/two-word-int.pkg #
src/lib/std/src/multiword-int-guts.pkg #
api Int {
#
eqtype Int;
precision: Null_Or( int::Int );
min_int: Null_Or( Int );
max_int: Null_Or( Int );
to_multiword_int: Int -> mwi::Int;
from_multiword_int: mwi::Int -> Int;
to_int: Int -> int::Int;
from_int: 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 -> 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;
mean: List( Int ) -> Int;
median: List( Int ) -> Int; #
list_min: List( Int ) -> Int; # Raises an exception if list is empty.
list_max: List( Int ) -> Int; # Raises an exception if list is empty.
sort: List( Int ) -> List( Int );
sort_and_drop_duplicates: List( Int ) -> List( Int );
# Should probably add 'odd' and 'even' here one of these days... XXX SUCKO FIXME
# Should probably add sort() and sort_and_drop_duplicates() here one of these days. XXX SUCKO FIXME
};
end;
## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.