Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: rixed@happyleptic.org
To: Nicolas Ratier <nicolas.ratier@femto-st.fr>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] int of infinity = 0
Date: Wed, 23 May 2018 08:55:44 +0200	[thread overview]
Message-ID: <20180523065544.GA32430@rxdmac.local> (raw)
In-Reply-To: <52412de6-948f-963c-059d-99bb7dab8f6d@femto-st.fr>

Note that is is also true for large floats:

utop # int_of_float 1e99;;
- : int = 0

More surprisingly:

utop # int_of_float (float_of_int max_int);;
- : int = -4611686018427387904

Marked as won't fix in this ticket from 2007 with some explanation:

https://caml.inria.fr/mantis/view.php?id=4207


      reply	other threads:[~2018-05-23  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 14:22 [Caml-list] Functional Programming @ DFINITY Mark Rafferty
2018-05-22 13:19 ` [Caml-list] int of infinity = 0 Nicolas Ratier
2018-05-23  6:55   ` rixed [this message]

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=20180523065544.GA32430@rxdmac.local \
    --to=rixed@happyleptic.org \
    --cc=caml-list@inria.fr \
    --cc=nicolas.ratier@femto-st.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