Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/smlnj-lib/Util/int-inf.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/Util/int-inf.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1193, Thu May 16 18:44:04 2002 UTC revision 1194, Fri May 17 14:32:28 2002 UTC
# Line 524  Line 524 
524                val (rm,_(*0*)) = divmodd (rm',scale)                val (rm,_(*0*)) = divmodd (rm',scale)
525                in (qt,rm) end                in (qt,rm) end
526    
527            fun eq ([], []) = true
528              | eq ((i : int)::ri,j::rj) = (i = j) andalso eq(ri, rj)
529              | eq _ = false
530    
531            fun neq ([], []) = false
532              | neq ((i : int)::ri,j::rj) = (i <> j) orelse neq(ri, rj)
533              | neq _ = true
534    
535          fun cmp ([],[]) = EQUAL          fun cmp ([],[]) = EQUAL
536            | cmp (_,[]) = GREATER            | cmp (_,[]) = GREATER
537            | cmp ([],_) = LESS            | cmp ([],_) = LESS
# Line 1002  Line 1010 
1010      val <<     = BitOps.<<      val <<     = BitOps.<<
1011      val ~>>    = BitOps.~>>      val ~>>    = BitOps.~>>
1012    
1013      (* these are not in the BASIS signature, but they are useful since IntInf.int
1014       * is not a builtin type yet.
1015       *)
1016        fun == (BI{sign=s1, digits=d1}, BI{sign=s2, digits=d2}) =
1017              (s1 = s2) andalso BN.eq(d1, d2)
1018        fun != (BI{sign=s1, digits=d1}, BI{sign=s2, digits=d2}) =
1019              (s1 <> s2) orelse BN.neq(d1, d2)
1020    
1021    end (* structure IntInf *)    end (* structure IntInf *)
1022    

Legend:
Removed from v.1193  
changed lines
  Added in v.1194

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0