Find largest left truncatable prime in a given base: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Raku}}: Use a library for primality checking) |
m (→{{header|Phix}}: removed pointless re-test (no speedup tho)) |
||
Line 1,285: | Line 1,285: | ||
if i>seen_depth |
if i>seen_depth |
||
or (i==seen_depth and mpz_cmp(vals[i], answer)>0) then |
or (i==seen_depth and mpz_cmp(vals[i], answer)>0) then |
||
if not mpz_probable_prime_p(vals[i], state) then continue end if |
|||
mpz_set(answer, vals[i]) |
mpz_set(answer, vals[i]) |
||
seen_depth = i |
seen_depth = i |