Re: calc_primes gives one more result than the max
- Posted by DerekParnell (admin) Nov 08, 2010
- 1109 views
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.