--- branches/vis12/src/compiler/fields/rational.sml 2012/07/07 04:35:18 1949 +++ branches/vis12/src/compiler/fields/rational.sml 2012/07/07 19:03:02 1950 @@ -37,6 +37,8 @@ val <= : rat * rat -> bool *) + val isZero : rat -> bool + val compare : rat * rat -> order val / : LargeInt.int * LargeInt.int -> rat @@ -70,6 +72,8 @@ val zero = R{num=0, denom=1} + fun isZero (R{num, ...}) = (num = 0) + fun gcd (a : II.int, 0) = a | gcd (a, b) = if (a > b) then gcd(a-b, b)
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: = (num = 0) + fun gcd (a : II.int, 0) = a | gcd (a, b) = if (a > b) then gcd(a-b, b)