From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B8F927F61D for ; Wed, 26 Oct 2016 11:38:54 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=toilatung90@gmail.com; spf=Pass smtp.mailfrom=toilatung90@gmail.com; spf=None smtp.helo=postmaster@mail-lf0-f53.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of toilatung90@gmail.com) identity=pra; client-ip=209.85.215.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="toilatung90@gmail.com"; x-sender="toilatung90@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of toilatung90@gmail.com designates 209.85.215.53 as permitted sender) identity=mailfrom; client-ip=209.85.215.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="toilatung90@gmail.com"; x-sender="toilatung90@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lf0-f53.google.com) identity=helo; client-ip=209.85.215.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="toilatung90@gmail.com"; x-sender="postmaster@mail-lf0-f53.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AkDg4Oh2YymcnI0gDsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?segXKfad9pjvdHbS+e9qxAeQG96KsbQa2qGP7+igATVGusnR9ihaMdRlbFwst4?= =?us-ascii?q?Y/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVIm?= =?us-ascii?q?bsy8IIPZjty22uau4NWTJlwQ3HvuKY91eSW/swTcrIEyjJFlO+5l+hLXo3ZSPc?= =?us-ascii?q?Bb32R5DVOVhRf1oMmqqs1N6SNV7s488cEIb7iyT7kxS/QMEDMnN2kp+cvk5EHr?= =?us-ascii?q?Qg6G539aWWITxEkbSzPZ5Q33C8+i+hDxsfBwjWzDZZX7?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DzAQCpeBBYhjXXVdFcGwEBAQMBAQEJA?= =?us-ascii?q?QEBFwEBBAEBCgEBgn8BAQEBATuBNweERIhqln6ITIQFgliFFoIJhiICgXcHPxQ?= =?us-ascii?q?BAQEBAQEBAQEBARIBAQEICwsJHTCCMwQBFQEEghEBAQMBEhEdARsdAQMBCwYFB?= =?us-ascii?q?AEGNwICIgERAQUBHAYbGogXAQMPCKVdgTI/MotGgWuCXwWDXQoZJw1Tgx0BAQE?= =?us-ascii?q?BAQEEAQEBARsCBhCLAodLglsBBIElAZMShVQIAQGBJwiOcZAEj0kTHoERHoQeI?= =?us-ascii?q?IFfPDSHHIFKAQEB?= X-IPAS-Result: =?us-ascii?q?A0DzAQCpeBBYhjXXVdFcGwEBAQMBAQEJAQEBFwEBBAEBCgE?= =?us-ascii?q?Bgn8BAQEBATuBNweERIhqln6ITIQFgliFFoIJhiICgXcHPxQBAQEBAQEBAQEBA?= =?us-ascii?q?RIBAQEICwsJHTCCMwQBFQEEghEBAQMBEhEdARsdAQMBCwYFBAEGNwICIgERAQU?= =?us-ascii?q?BHAYbGogXAQMPCKVdgTI/MotGgWuCXwWDXQoZJw1Tgx0BAQEBAQEEAQEBARsCB?= =?us-ascii?q?hCLAodLglsBBIElAZMShVQIAQGBJwiOcZAEj0kTHoERHoQeIIFfPDSHHIFKAQE?= =?us-ascii?q?B?= X-IronPort-AV: E=Sophos;i="5.31,550,1473112800"; d="scan'208,217";a="242410263" Received: from mail-lf0-f53.google.com ([209.85.215.53]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 26 Oct 2016 11:38:53 +0200 Received: by mail-lf0-f53.google.com with SMTP id b81so3119843lfe.1; Wed, 26 Oct 2016 02:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9r5I9wPF1Fo4MVkqeswmPp1kRBhZr5A6j86FSPRra+8=; b=QIkQm5o+JHFD6SHmjD6p1foDwRKiOg0wBXwl6ASKxfww7AS4zER7RdVL4OeWgeI9j8 G5Soe7H5utj0cthyzO8aBJkV5Y8hFn57+S64TwGEQwCUORVqLkX/Tl/+aFQz4urwxXJL HewpPfYfF6zTfKfnU/EOfseEzeu025+g09SAKsv/PgwXQY0RwV08UQQ0vxKHXhjn0GWn kkru2P3ftMs+hdre7LPoqiWJpXfrp6V/fbkKqLv7qltC4l/ddJpsOnDXeJ7uxLEfS8QN IFyLDAAnojMAee8DkT13X1YcVoNlEjPcyhjs7yrMmFDrXgVBdnNmjJ/xBDX7IpN1ixf0 JhsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9r5I9wPF1Fo4MVkqeswmPp1kRBhZr5A6j86FSPRra+8=; b=BfOlJZ17enJfmPptGihG33wpmuapqUh5vtO9Ry6wTJobWGqRjnNN2oCtFpX8OlBZuF FqaPyNMreH5JGZ2SYZwysIVUj2m3j2rqxQBpVOwfI4yxjBcEEAl+iC2hXSrlVfi5ANjJ uQXXKONAoEMPoJPpwgZ7zOnJeBErzhmAXIdI4wJyXO9GyBznYM9BZWKme7KFmGFi0XAl YrdJjstSPo8jFFVlgkXojdQCVCNzADJaW26MFCucgC51KiHUD4WmBLfBmMrFBoSqL9HF YfIjV03vBfqcGL6QF/t4Hfl4HCj27tvGV841B6lmdzQkqieC7FlpjI2r51ZPrqPwNpdf FMLg== X-Gm-Message-State: ABUngvd+26ZUSDpVMll83Exjr8ZoZBHsOX7CFLhoFc5o6oa1i0hQXT2JuX+wdm9oMxeXpY+2n4u6vDDRAXdfiQ== X-Received: by 10.25.208.11 with SMTP id h11mr878851lfg.111.1477474732930; Wed, 26 Oct 2016 02:38:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.24.206 with HTTP; Wed, 26 Oct 2016 02:38:52 -0700 (PDT) In-Reply-To: <6ed7708d-1e70-7072-f537-dbe305da3b09@inria.fr> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CFA061B@IRSMSX102.ger.corp.intel.com> <25995371-4f79-352b-35fe-7edb92de8161@normalesup.org> <0F7D3B1B3C4B894D824F5B822E3E5A172CFA06ED@IRSMSX102.ger.corp.intel.com> <6ed7708d-1e70-7072-f537-dbe305da3b09@inria.fr> From: Tung Vu Xuan Date: Wed, 26 Oct 2016 11:38:52 +0200 Message-ID: To: Xavier Leroy Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001a1141271c9efd10053fc1642d Subject: Re: [Caml-list] Approximations when converting from string to float --001a1141271c9efd10053fc1642d Content-Type: text/plain; charset=UTF-8 Hi Xavier, > But probably you don't need > the interval arithmetic in the end: both "top" and "top + 1" convert > to floats without rounding (*), Yes, you're right :). > and the scaling by 2^n can be achieved > with "ldexp". > What is the semantics of "ldexp" in bounds cases? For example, I tried "ldexp max_float max_int;;" which returns "8.98846567431157854e+307". Shouldn't we expect something like "infinity"? Best, Tung. --001a1141271c9efd10053fc1642d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Xavier,
=C2=A0
But probably you don't need
the interval arithmetic in the end: both "top" and "top + 1&= quot; convert
to floats without rounding (*),

Yes, you= 9;re right :).
=C2=A0
and the scaling by 2= ^n can be achieved
with "ldexp".

What is the sem= antics of "ldexp" in bounds cases? For example, I tried "lde= xp max_float max_int;;" =C2=A0which returns "8.98846567431157854e= +307". Shouldn't we expect something like "infinity"?
=C2=A0
Best,
Tung.
<= /div>
--001a1141271c9efd10053fc1642d--