Ask Your Question

matthew.weippert's profile - activity

2019-04-18 21:42:35 +0200 received badge  Student (source)
2019-04-18 19:56:44 +0200 received badge  Popular Question (source)
2019-04-18 19:56:44 +0200 received badge  Notable Question (source)
2019-04-18 19:56:44 +0200 received badge  Famous Question (source)
2013-04-18 17:32:28 +0200 received badge  Supporter (source)
2013-04-02 10:46:47 +0200 asked a question Integer vs ZZ

What's the difference between sage class ZZ (rings/integer_ring.pyx) and Integer (rings/integer.pyx)?

Is one preferred over the other in some cases? Do they provide different functionality?

Maybe instances of Integer are elements of ZZ?!

Example:

a = ZZ(10)
b = Integer(3)
c = a + b
print a, b, c
print "Type of elements:", type(a), "vs", type(b), "vs", type(c)
print "Type of classes: ", ZZ, "vs", Integer