220 37538 <8eb5c7cd-42ec-46bd-8aee-842ef11b885e@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Alberto Barbati <albertobarbati@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Remove floating point requirement for
 unordered (multi) set/map
Date: Wed, 28 Mar 2018 08:42:24 -0700 (PDT)
Lines: 85
Approved: news@gmane.org
Message-ID: <8eb5c7cd-42ec-46bd-8aee-842ef11b885e@isocpp.org>
References: <4c98e549-8f0c-42e5-a054-0234f7cf1e46@isocpp.org> <9d4a8ea3-9e7d-4851-8b28-5cd67779081a@isocpp.org>
 <CAN5YuFb+Gdsijsjbrm6xx2ASpUNpubApEeVK3MQc1y=NtV8JiQ@mail.gmail.com>
 <1356e140-2985-4fe7-b9ee-70e40738d1cf@isocpp.org>
 <7b853bcd-47f5-4c2c-841b-13e30472e14c@isocpp.org>
 <af922ddf-a2c4-4654-a246-de2452477c95@isocpp.org>
 <1df72d61-2659-4864-9a6d-f8ea8fe52792@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_23062_1254661168.1522251744654"
X-Trace: blaine.gmane.org 1522251623 16304 195.159.176.226 (28 Mar 2018 15:40:23 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 28 Mar 2018 15:40:23 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCPY5DV6RIMBBYPP53KQKGQE2ONIXLQ@isocpp.org Wed Mar 28 17:40:19 2018
Return-path: <std-proposals+bncBCPY5DV6RIMBBYPP53KQKGQE2ONIXLQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f200.google.com ([209.85.217.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCPY5DV6RIMBBYPP53KQKGQE2ONIXLQ@isocpp.org>)
	id 1f1DBT-00049t-25
	for gclcip-std-proposals@m.gmane.org; Wed, 28 Mar 2018 17:40:19 +0200
Original-Received: by mail-ua0-f200.google.com with SMTP id w9sf1858436uaa.17
        for <gclcip-std-proposals@m.gmane.org>; Wed, 28 Mar 2018 08:42:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=p19V/d9vWf41KVuTunzvo6O51Km8xBh6yWzwJZIOEEY=;
        b=Mjw1PfIULZvVD+AlJO+b1kg377gx+21NVvb9yn8xmiJOBAvL5zOFwRz7WY3maOnZPG
         8JF4Kp8TDJ4xRt6t5vSPB9kU6HaW73aE1GiY2L6TtxXHO9JJvY3kD9v96yPtgRtWnzor
         edxDzidXhV5FFS/KdK9tarMOd3l51wHCWTXEL0EDEgb3bnjfPKEKkKuahrBn1QLqPlXM
         udsD7tFlFDQ9lLHTQyfXoM/xGB81iH+lyHYPawvx/nVQ3ajU53mE6tlzlD2AliUuWBBK
         sX8xxMmyX0jtQpdLa0X3FPmslmDTokKa1SA+A9GdA7/ZPGgVnN4HWZ7po/NSX+e2hf6E
         aalA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=p19V/d9vWf41KVuTunzvo6O51Km8xBh6yWzwJZIOEEY=;
        b=PSUzKb+UJ6qU/+HrpyYa8t3kEyYmJQmqkiwz07niRpT+lGBEUWoiZK6tEMzlYmd5NP
         BlZJuqa/x8fJtgUrOzmFGWVB+W8+BYMU3gNTk4eta4zGRzzoBncOw5yZxT1erDuZ1Yrm
         2X0FEv7Mb+Rq4yhGIllfCvivMHQ8u+58th6XeAsP3wE/1FTb3rx51gx5yMrW+9JeWbuU
         tlz4uZvux0RDaPhoRevt+ZNL0QYyi27B3j3mnELgvW177Arw5gK2w8EKVujeKSyoV74V
         pszKkOtzEF+ieyju+i3Uz2FKPx50qROsgG7as31kCjaxOzj7PtDi8kjH/BW2S5Dp5A+H
         BbyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=p19V/d9vWf41KVuTunzvo6O51Km8xBh6yWzwJZIOEEY=;
        b=tg7nayFrAIx0EVc5yuaawlvqqSiAs5lFDPcHLqa164bJvPWXshBvxD8wn3Q1QQpg+M
         +FsrPCp2VGzEt+UkhqOV2+Mpn3b1aIQ7PvDxwDQ/P+CksTN+YbEsIO0icgt8uOFyvldh
         bsuYriKmPQAaGqgUacYwYFpzpzK8ag7pLQuucwHaqAGuQR6IjTkTl43H8kiik/FJpTM4
         xa1g//CMJv6Efz0i2A1dsmzOV2fmW59FOGTP8nRWMhcFZ509UbEL0y3F/UwHKtqJl1Gp
         9pZQqHgBionHJqMTb3bcGEk9E7I3nuCoP08DuRgbTbws005spOOdOsGSyCAoD3dRIS0m
         OPgg==
X-Gm-Message-State: AElRT7F0569sJuKyPyHLNE+XCrxi1LSXhH8xk93G0Qhznt74tuOCRkng
	8Fcr+xc6ehAIlqi952MF7QruXw==
X-Google-Smtp-Source: AG47ELvcpL2sWeZSJSTtiNqt5qaWJ7a5p4C7fqxixr0RPLTX5RdtC4UpELF+JVtQbdC37DsqSWTuJg==
X-Received: by 10.176.112.140 with SMTP id m12mr16350288ual.32.1522251746516;
        Wed, 28 Mar 2018 08:42:26 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.16.193 with SMTP id 62ls2391765vkq.16.gmail; Wed, 28 Mar
 2018 08:42:25 -0700 (PDT)
X-Received: by 10.31.148.135 with SMTP id w129mr2143344vkd.14.1522251745078;
        Wed, 28 Mar 2018 08:42:25 -0700 (PDT)
In-Reply-To: <1df72d61-2659-4864-9a6d-f8ea8fe52792@isocpp.org>
X-Original-Sender: AlbertoBarbati@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37538
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37538>

------=_Part_23062_1254661168.1522251744654
Content-Type: multipart/alternative; 
	boundary="----=_Part_23063_1456266454.1522251744654"

------=_Part_23063_1456266454.1522251744654
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable


Il giorno mercoled=C3=AC 28 marzo 2018 17:35:48 UTC+2, Ben Craig ha scritto=
:
>
> Even if you add new interfaces to deal with the load factor, the internal=
s=20
> are likely to still need to use floating point math in order to continue=
=20
> supporting the old interfaces.  Unless you are willing to write your own=
=20
> std::unordered_* containers and replace the ones shipped with libstdc++ o=
r=20
> libc++ with those, you will probably be stuck with some amount of floatin=
g=20
> point math in the containers.
>
> reserve does math on the load factor.  insert does comparisons with the=
=20
> load factor.
>

That is incorrect. The implementation is allowed to store and use=20
internally a fixed point representation of the max load factor and perform=
=20
math on such value. The only places in which floating point is actually=20
necessary are the interface functions max_load_factor() and load_factor().

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/8eb5c7cd-42ec-46bd-8aee-842ef11b885e%40isocpp.or=
g.

------=_Part_23063_1456266454.1522251744654
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>Il giorno mercoled=C3=AC 28 marzo 2018 17:35:48 UTC+2,=
 Ben Craig ha scritto:<blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><div>Even if you add new interfaces to deal with the load factor, =
the internals are likely to still need to use floating point math in order =
to continue supporting the old interfaces.=C2=A0 Unless you are willing to =
write your own std::unordered_* containers and replace the ones shipped wit=
h libstdc++ or libc++ with those, you will probably be stuck with some amou=
nt of floating point math in the containers.</div><div><br></div><div>reser=
ve does math on the load factor.=C2=A0 insert does comparisons with the loa=
d factor.<br></div></div></blockquote><div><br>That is incorrect. The imple=
mentation is allowed to store and use internally a fixed point representati=
on of the max load factor and perform math on such value. The only places i=
n which floating point is actually necessary are the interface functions ma=
x_load_factor() and load_factor().<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8eb5c7cd-42ec-46bd-8aee-842ef11b885e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8eb5c7cd-42ec-46bd-8aee-842ef11b885e=
%40isocpp.org</a>.<br />

------=_Part_23063_1456266454.1522251744654--

------=_Part_23062_1254661168.1522251744654--

.
