Browse thread
[Caml-list] Are you sure the new "=" of 3.08 is good ?
-
Christophe Raffalli
-
Jean-Christophe Filliatre
- Christophe Raffalli
- Sébastien_Furic
- Xavier Leroy
-
Jean-Christophe Filliatre
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe Raffalli <Christophe.Raffalli@u...> |
| Subject: | Re: [Caml-list] Are you sure the new "=" of 3.08 is good ? |
Jean-Christophe Filliatre wrote: > Christophe Raffalli writes: > > > > I spend one complete day to adapt Phox (my theorem prover) to 3.08 > > because the new = does not check first physical equality. > > Indeed, and it was mentioned in Ocaml 3.08 changes: > > ====================================================================== > * Revised handling of NaN floats in polymorphic comparisons. > The polymorphic boolean-valued comparisons (=, <, >, etc) now treat > NaN as uncomparable, as specified by the IEEE standard. > The 3-valued comparison (compare) treats NaN as equal to itself > and smaller than all other floats. As a consequence, x == y > no longer implies x = y but still implies compare x y = 0. > ====================================================================== I knew and read that (at least the diagnostic was easy), but it was still enoyying to have to look for the change to do among 15000 lines of code. And being forced to use compare x y instead of x = y is ugly. > but Pervasives.compare still checks for physical equality first. It's > clear when having a look at byterun/compare.c. > And assoc now use compare ... -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature ---------------------------------------------