On Mon, Feb 23, 2009 at 1:29 AM, Fabian Seoane <[email protected]> wrote:
>
>
> On Mon, Feb 23, 2009 at 10:16 AM, Fabian Seoane <[email protected]>
> wrote:
>>
>> currently SymPy has a rather confusing behaviour:
>>
>> In [1]: isprime(1)
>> Out[1]: False
>>
>> In [2]: Integer(1).is_prime
>> Out[2]: True
>>
>> I'd be glad to fix this, but ... which one is correct?
>
> responding to myself, I think 1 should not be considered prime, since prime
> numbers are defined for n>=2 (as isprime from sympy.ntheory correctly says),
> so  Integer(1).is_prime is wrong

Yeah, Sage also returns False for 1:

sage: 1.is_prime()
False
sage: 2.is_prime()
True


Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to