Version française
Home     About     Download     Resources     Contact us    
Browse thread
equality of Big_ints
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <Alain.Frisch@i...>
Subject: Re: [Caml-list] equality of Big_ints
skaller wrote:
> The reason may be because the equality of integers
> isn't the same as algebraic equality of the data structures:

Indeed, but this is not about maintaining an invariant. Because of the
representation of Big_int.big_int as a pair (sign,absolute value), the
polymorphic comparison would give (-1) < (-2) if the custom comparison
were used for Nat.nat.

-- Alain