# HG changeset patch # User webertj # Date 1146739801 -7200 # Node ID 4866ebb16ba819d17086280628fa72b2fe2cf23e # Parent a3951e34269f40842467c0e3dfb40ad74f6a42c2 Rat.one added diff -r a3951e34269f -r 4866ebb16ba8 src/Pure/General/rat.ML --- a/src/Pure/General/rat.ML Thu May 04 11:34:27 2006 +0200 +++ b/src/Pure/General/rat.ML Thu May 04 12:50:01 2006 +0200 @@ -10,6 +10,7 @@ type rat exception DIVZERO val zero: rat + val one: rat val rat_of_int: int -> rat val rat_of_intinf: IntInf.int -> rat val rat_of_quotient: IntInf.int * IntInf.int -> rat @@ -40,6 +41,8 @@ val zero = Rat (true, 0, 1); +val one = Rat (true, 1, 1); + fun rat_of_intinf i = if i < 0 then Rat (false, ~i, 1)