One-two primes: Difference between revisions

Content deleted Content added
m →‎{{header|Quackery}}: tweaked commentary
PureFox (talk | contribs)
m →‎{{header|Wren}}: Changed to Wren S/H
Line 972: Line 972:
===Task specific===
===Task specific===
This is based on the Python code in the OEIS entry. Run time about 52 seconds.
This is based on the Python code in the OEIS entry. Run time about 52 seconds.
<syntaxhighlight lang="ecmascript">import "./gmp" for Mpz
<syntaxhighlight lang="wren">import "./gmp" for Mpz
import "./fmt" for Fmt
import "./fmt" for Fmt
import "./iterate" for Stepped
import "./iterate" for Stepped
Line 1,048: Line 1,048:


64-bit integers are needed to find the first 20 terms so we need to use the above module here.
64-bit integers are needed to find the first 20 terms so we need to use the above module here.
<syntaxhighlight lang="ecmascript">import "./long" for ULong
<syntaxhighlight lang="wren">import "./long" for ULong
import "./fmt" for Conv, Fmt
import "./fmt" for Conv, Fmt


Line 1,072: Line 1,072:
===Generalized===
===Generalized===
Slower than Raku at about 15.2 seconds though acceptable given that Wren is having to do a lot of string manipulation here.
Slower than Raku at about 15.2 seconds though acceptable given that Wren is having to do a lot of string manipulation here.
<syntaxhighlight lang="ecmascript">import "./gmp" for Mpz
<syntaxhighlight lang="wren">import "./gmp" for Mpz
import "./fmt" for Fmt
import "./fmt" for Fmt
import "./iterate" for Stepped
import "./iterate" for Stepped