From: "ivan chollet" <ivan.chollet@free.fr>
To: "'Alain Frisch'" <alain@frisch.fr>
Cc: <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Re: ocaml sefault in bytecode: unanswered questions
Date: Sun, 9 Aug 2009 16:13:24 +0200 [thread overview]
Message-ID: <000001ca18fb$8fdcf180$af96d480$@chollet@free.fr> (raw)
In-Reply-To: <4A7ED53B.90607@frisch.fr>
Cool, thanks for that, for some reason this wasn't obvious to me reading the
documentation.
-----Original Message-----
From: Alain Frisch [mailto:alain@frisch.fr]
Sent: dimanche 9 août 2009 15:55
To: ivan chollet
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: ocaml sefault in bytecode: unanswered questions
On 8/9/2009 2:06 PM, ivan chollet wrote:
> I would have thought physical equality implies structural equality, but
> it doesnt seem like it.
>
> Can you please explain to me whats wrong there?
There are two modes for the generic comparison. The total mode
(Pervasives.compare) creates a total ordering between values (except for
functional values and custom blocks with no comparison function) and
uses physical equality as a shortcut to cut the recursive traversal of
sub-values. The non-total mode (used by the operators = < > <= >=) has a
different behavior for NaN values ([nan <= x], [x <= nan], and [nan = x]
all return false, including when x is nan) and does not use the physical
equality shortcut (so that [let x = (nan, nan) in x = x] returns false).
-- Alain
next prev parent reply other threads:[~2009-08-09 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-08 17:09 ivan chollet
2009-08-08 17:24 ` [Caml-list] " David Allsopp
2009-08-09 7:58 ` ivan chollet
2009-08-09 10:16 ` Michel Mauny
[not found] ` <001501ca18cc$d59a61a0$80cf24e0$@metastack.com>
2009-08-09 12:06 ` ivan chollet
2009-08-09 13:20 ` David Allsopp
2009-08-09 13:55 ` Alain Frisch
2009-08-09 14:13 ` ivan chollet [this message]
2009-08-09 18:56 ` Elnatan Reisner
2009-08-09 19:09 ` Alain Frisch
2009-08-10 13:22 ` Elnatan Reisner
2009-08-10 13:36 ` Martin Jambon
2009-08-10 14:26 ` Elnatan Reisner
2009-08-09 16:14 ` Goswin von Brederlow
2009-08-10 4:14 ` ivan chollet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001ca18fb$8fdcf180$af96d480$@chollet@free.fr' \
--to=ivan.chollet@free.fr \
--cc=alain@frisch.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox