Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/fields/rational.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/fields/rational.sml

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

revision 1949, Sat Jul 7 04:35:18 2012 UTC revision 1950, Sat Jul 7 19:03:02 2012 UTC
# Line 37  Line 37 
37      val <= : rat * rat -> bool      val <= : rat * rat -> bool
38  *)  *)
39    
40        val isZero : rat -> bool
41    
42      val compare : rat * rat -> order      val compare : rat * rat -> order
43    
44      val / : LargeInt.int * LargeInt.int -> rat      val / : LargeInt.int * LargeInt.int -> rat
# Line 70  Line 72 
72    
73      val zero = R{num=0, denom=1}      val zero = R{num=0, denom=1}
74    
75        fun isZero (R{num, ...}) = (num = 0)
76    
77      fun gcd (a : II.int, 0) = a      fun gcd (a : II.int, 0) = a
78        | gcd (a, b) = if (a > b)        | gcd (a, b) = if (a > b)
79            then gcd(a-b, b)            then gcd(a-b, b)

Legend:
Removed from v.1949  
changed lines
  Added in v.1950

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