1(* Copyright (c) Michael Norrish *) 2 3signature mlibArbnum = 4sig 5 6 eqtype num 7 8 val zero : num 9 val one : num 10 val two : num 11 12 val times2 : num -> num 13 val div2 : num -> num 14 val mod2 : num -> num 15 16 val plus1 : num -> num 17 val plus2 : num -> num 18 val less1 : num -> num 19 val less2 : num -> num 20 21 val toString : num -> string 22 val fromString : string -> num 23 val fromInt : int -> num 24 val toInt : num -> int (* may raise Overflow *) 25 val asList : num -> int list 26 27 val + : num * num -> num 28 val - : num * num -> num 29 val * : num * num -> num 30 val div : num * num -> num 31 val mod : num * num -> num 32 val divmod : num * num -> num * num 33 34 val < : num * num -> bool 35 val <= : num * num -> bool 36 val > : num * num -> bool 37 val >= : num * num -> bool 38 39end 40