Re: calc_primes gives one more result than the max

new topic     » goto parent     » topic index » view thread      » older message » newer message
Anthill said...

? calc_primes(10, 5)

{2,3,5,7,11} 

The max prime number should be 7 not 11. I had the same type of problem using 1000 (max_p). Euphoria Interpreter 4.0.0 Beta 4 (r3376) for Linux

According to the manual (search 'calc_primes') this is working as expected.

max_p : an integer, the last prime returned is the next prime after or on this value. 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu