220 36872 <9150311.INAnE2rANT@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Prime test functions
Date: Sun, 11 Feb 2018 12:55:43 -0800
Lines: 37
Approved: news@gmane.org
Message-ID: <9150311.INAnE2rANT@tjmaciei-mobl1>
References: <fc678dff-6bec-4f54-bb7b-22e140b54d71@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1518382435 7701 195.159.176.226 (11 Feb 2018 20:53:55 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 11 Feb 2018 20:53:55 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBUW3QLKAKGQEVVSJKMY@isocpp.org Sun Feb 11 21:53:50 2018
Return-path: <std-proposals+bncBCB4TK757YBRBUW3QLKAKGQEVVSJKMY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f198.google.com ([209.85.216.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBUW3QLKAKGQEVVSJKMY@isocpp.org>)
	id 1ekyd4-0001IN-FM
	for gclcip-std-proposals@m.gmane.org; Sun, 11 Feb 2018 21:53:42 +0100
Original-Received: by mail-qt0-f198.google.com with SMTP id y7sf4697519qti.21
        for <gclcip-std-proposals@m.gmane.org>; Sun, 11 Feb 2018 12:55:48 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1518382547; cv=pass;
        d=google.com; s=arc-20160816;
        b=0FStOlcEFX2f2y/Rdycp7E7CONAMgOgosGQts39GTknYnyJ1aagaz86I0j5T0S7Sdo
         7NUKvAq5EXY/bnmQCxgERVUQyIhaly7hCssnndQUpdKTe6BDUaPBfGK3/iIsjbIBbOZm
         mvWglth1inZjyUijjOOAMlKqyjn7r086JPnhilgXMATFKednrbXmRhrUYRjvng0OwPYk
         BAP2DWbT486eYYG2l1Yo+kje/Ja0ucNBopS9QDpu5PEAMukzAIkwl6fA185eoHzT1pAl
         8ziqdddCfn7XtWsAdU1pOkhXu72K0oW0rSy3q4kxQ8pPgs57A9Pk/GAOo5Qy/NhkmNhe
         kFJg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=cfZ04zMKVB4W10rO/X2PYVfgTF7plEmaLO/N5OZL0Es=;
        b=LLtu4oB+E7nacPHnzaMFjXYc+fr86dFMqQZNtOLgLLuXeqzceSxo7UYjgyi0cnVKkJ
         pHfZkYQAtZN8UUCxySD0vVXxvlmFQT2uUXahGwUYfiLjPC9sZx+8WPDihG16ifxqMLvZ
         1JjKBhbgpO9hj0GQ/P4ZdrZFwtMK5MB8vyRyQZyYH9pU1TNeQwkaXvpTgV3SB6G2OLpf
         JwsUXPlckgswuphZ5IbBSA90wEpAMsD59OT5J22HuA9qBPzFJfwnKCxY+7KkWyUcFmt3
         d8C5+lKblJ1d4rl71AdXx6ExObjNwDsNYnXPJFBtQpUEbu2uUWkgS6g08oaBa0dxmOC1
         aJvg==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=cfZ04zMKVB4W10rO/X2PYVfgTF7plEmaLO/N5OZL0Es=;
        b=ubVzZ5CDVc9oLOCClSxHSvQ0ozuqQkHHqmnoJ66ATtC05GQFBhXuyRMZbcnsTq0xAK
         oSV3D13AOI0wZ1S5ONuWqGX2k0mIG2FTzWbw+2zF/ic/MDW2WBlRu0i1LoLAobZ5FY2y
         CA9lEHwsj3D2bZDGiXNYbWyNMarQZ/F7tp0CbgTpMOwJipWMdfW2BehXZE+lZy46TDHr
         eki/Ue3CiDOCLbx6pfc80X32ZuB1/bCB7fBhzxgx2AYuj8ziG2Bjm0VMt/WGeO/ZmZKa
         V/lcEInNug0+TZNBZRseWO9j3VFIJ/8MBSd167T6F0t3HpbwZ0CYcdjFUpZ5yt8IgSiQ
         qLgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=cfZ04zMKVB4W10rO/X2PYVfgTF7plEmaLO/N5OZL0Es=;
        b=g+2U/LAldFDf3h1K4CpjYZnuswA80sts4sgsu22zQY3RySlwLw2JqdKl1H6lQUOYgM
         Rr7xgQfhHUXud6d9x8GroxWCZ75kfnMMa7GCEpGnFlR3eelHCFMFuQ3dd3OR1YUObl+H
         u9o0SRw4qBmz2R9Da30y+WxBIpeX+U2RQzXObuEZUWKLIQ1MA7PIiwUsbdj+tGyIalRv
         PyYPdJ9jzWhjd9WVdOlLhOiMAo8hKS7gBAgl+U1HBxuhq6MiTQbaLUxj0It7Fb322X/i
         s3xRvKymbxguocb4Bz8z26cU2bxsme45QfVJS0VrPemp7nthZT3CZW9TdrVcdL5TvvMA
         JtRw==
X-Gm-Message-State: APf1xPAvIgdtGkQ5PRNyM6iLTWABm3Tq+bPUVa5yLqPyDg6FRAnFfvPb
	uzDcrF0SnFLw7j+bon/uCN216A==
X-Google-Smtp-Source: AH8x226LxuWQDy2ImKHH8qYodxWOo6rctrdHI3ycpwVxuPvJaVhi/9YbwNhvur/DSWGNP/8heJdqnQ==
X-Received: by 10.200.45.170 with SMTP id p39mr7848412qta.59.1518382547723;
        Sun, 11 Feb 2018 12:55:47 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.237.60.99 with SMTP id u32ls6904715qte.11.gmail; Sun, 11 Feb
 2018 12:55:46 -0800 (PST)
X-Received: by 10.200.56.249 with SMTP id g54mr2383040qtc.245.1518382546507;
        Sun, 11 Feb 2018 12:55:46 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1518382546; cv=none;
        d=google.com; s=arc-20160816;
        b=K+cjEWiTV6HAzUZlPqEo4P+Tpuy4YRuKwL7PHykmjuLo6zA1q9dUIlNvxWPWyIadcn
         0hbC6FWSByEgDWKK0d7YRu4oR8/bm4AXyo8k5qFjX2lcMa46Qki9j/af1ZXkzpu9Ewck
         /mAKjwZfhrko0Uk+Bvss6duuPiV+HyJDQGsbFIt5KBoWeGbRPkRbLOu9hGIe4JQmtZRI
         ewFqCCyztxbDkg+UQC+y3Fgf7Beib/KSYZm0R+4eXJit/FoDpMJsj5k7dCZcW9IDc+T7
         98hZY8f0tISfpU/Zn9n0Z7tj2XgLD9YRME0JwLbjPEpIFCrWPOsmUXMqmkxygDqqJ69V
         XxKg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=J36T5yiNL+W2tDgNC582C5H6MZqD2M6lrTE2B9VqBb0=;
        b=qV9aJI6pragK5UEDkhsztJ0Rs0l1qrlMZM6frBvaymcrhVnvYc/tc4immz9o69yoii
         TURURPUKVlI+iiVIVXo9QvicVGgDUZCuHk2c19Wo6j8maKZGMk2hbiRjxgx1KZZRfOVd
         wSTAjCA5TCMI+podWlvADON0NgaGwT0Tgp0HQfpnyxt/cWI8hDQwnymNwJ0mdmgYnj/7
         6Iciynik8AmO+Z0fQgCABBC4ioQqwnQHReKWGKzCArxGroBA9JKJErbz249Appp1O82B
         O3hRO5CdJyHHuALXh8EFHJ7kmuy+Ys1lOTQU8pXm9IJ1maYOi/AOnIbbNRFr+r+oWjTO
         uR+w==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from smtp.macieira.info (arvernien.macieira.info. [209.222.10.136])
        by mx.google.com with ESMTPS id u84si696611qkl.325.2018.02.11.12.55.46
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 11 Feb 2018 12:55:46 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) client-ip=209.222.10.136;
Original-Received: from tjmaciei-mobl1.localnet (unknown [IPv6:2601:1c0:4501:5f9f:1898:5a56:9160:57ba])
	by smtp.macieira.info (Postfix) with ESMTPSA id CD3DE81D1
	for <std-proposals@isocpp.org>; Sun, 11 Feb 2018 12:55:44 -0800 (PST)
In-Reply-To: <fc678dff-6bec-4f54-bb7b-22e140b54d71@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) smtp.mailfrom=thiago@macieira.org
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:36872
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36872>

On Sunday, 11 February 2018 12:09:53 PST Alexander Zaitsev wrote:
> Hello,
> 
> I want to get feedback about my proposal about adding prime test functions
> to C++. You can find it as an attached file.
> 
> Open questions:
> 
>    - I am not sure about interface for is_probable_prime interface. On the
>    one hand i don't want to see under the hood any specific imeplementation.
> On the other hand i should guarantee something (I mean complexity and
> probablity).
> 
> 
> Do you have any suggestions?

Please add answers to these questions:

How often is this necessary? What use-cases for it exist, besides cryptography 
(which will need numbers wider than 64-bit anyway)? Does it even exist in any 
modern math library?

What is the complexity if this function? Do you have a suggested 
implementation for it?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center



-- 
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 email 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/9150311.INAnE2rANT%40tjmaciei-mobl1.

.
