Gentoo Archives: gentoo-dev

From: Rolf Eike Beer <eike@×××××××.de>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] qmail.eclass: simplify is_prime()
Date: Fri, 18 Jun 2021 19:56:21
Message-Id: 5473859.DvuYhMxLoT@daneel.sf-tec.de
In Reply to: Re: [gentoo-dev] [PATCH] qmail.eclass: simplify is_prime() by Michael Orlitzky
1 Am Freitag, 18. Juni 2021, 21:10:27 CEST schrieb Michael Orlitzky:
2 > > This depends on the actual domain of numbers. If the primes involved
3 > > have 20 digits as in your example, then factor should be used of course.
4 > >
5 > > I suspect though that we're talking about small numbers (below 100?)
6 > > here, in which case a solution in pure bash would be preferable.
7 >
8 > If so, we could just list them all.
9
10 The primes are usually small, the default is 23, and I have never seen anyone
11 _lowering_ that number. The whole point is: the algorithm does much more than
12 it should, which makes it needlessly verbose. The simpler the solution the
13 better, preferably without restricting the actual number.
14
15 Eike

Attachments

File name MIME type
signature.asc application/pgp-signature