From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: language defined list of prime numbers
Date: Sat, 09 Dec 2017 11:43:11 -0500
Date: 2017-12-09T11:43:11-05:00 [thread overview]
Message-ID: <d24o2d1o7798lqqr83ifvt1g2p1n1dhmvl@4ax.com> (raw)
In-Reply-To: 1afe0b2c-eb71-4197-9bbb-b78532e4cd7e@googlegroups.com
On Sat, 9 Dec 2017 07:57:52 -0800 (PST), Mehdi Saada <00120260a@gmail.com>
declaimed the following:
>Does the norm compel compilers to provide a descent list of prime numbers ? I can't find "prime" in the RM.
"Prime number" is a concept just like "odd" and "even". No compiler
that I know of provides such as an inherent data type -- they must be
determined at run-time via an algorithm you have to provide. For
"odd"/"even" that algorithm is rather simple, using a simple modulo 2
operation. For "prime number" the algorithm becomes time consuming unless
one caches results for future use -- Google "Sieve of Eratosthenes" -- the
larger the prime number, the more time it takes to compute it.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
next prev parent reply other threads:[~2017-12-09 16:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-09 15:57 language defined list of prime numbers Mehdi Saada
2017-12-09 16:18 ` Mr. Man-wai Chang
2017-12-09 17:05 ` Mehdi Saada
2017-12-09 17:13 ` Jeffrey R. Carter
2017-12-09 17:23 ` Mr. Man-wai Chang
2017-12-09 19:17 ` Mehdi Saada
2017-12-13 10:41 ` Mr. Man-wai Chang
2017-12-15 5:58 ` Dirk Heinrichs
2017-12-15 11:41 ` Mr. Man-wai Chang
2017-12-15 15:32 ` Dirk Heinrichs
2017-12-09 16:43 ` Dennis Lee Bieber [this message]
2017-12-09 19:09 ` Mehdi Saada
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox