Lucas-Lehmer test: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→RPL HP-28 series: typo) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 4,120:
{{libheader|wren-math}}
This follows the lines of my Kotlin entry but uses a table to quicken up the checking of the larger numbers. Despite this, it still takes just over 3 minutes to reach M4423. Surprisingly, using ''modPow'' rather than the simple ''%'' operator is even slower.
<syntaxhighlight lang="
import "./math" for Int
import "io" for Stdout
Line 4,167:
{{libheader|Wren-gmp}}
Same approach as the CLI version but now uses GMP. Far quicker, of course, as we can now check up to M110503 in less time than before.
<syntaxhighlight lang="
import "./math" for Int
|