Lucas-Lehmer test: Difference between revisions
Content added Content deleted
(Added Easylang) |
Langurmonkey (talk | contribs) |
||
Line 2,281: | Line 2,281: | ||
=={{header|langur}}== |
=={{header|langur}}== |
||
{{trans|D}} |
{{trans|D}} |
||
{{works with|langur|0.11}} |
|||
I suppose it is theoretically possible to test to the 47th Mersenne prime, as stated in the task description, though it could take a while. As for the limit, it would be very high. |
I suppose it is theoretically possible to test to the 47th Mersenne prime, as stated in the task description, though it could take a while. As for the limit, it would be very high. |
||
With slight syntactic differences, the following would work with earlier versions of langur if you limit it to smaller numbers. 0.8 switched to arbitrary precision. |
|||
<syntaxhighlight lang="langur">val .isPrime = f .i == 2 or |
<syntaxhighlight lang="langur">val .isPrime = f .i == 2 or |