Rational variable

asked 2 years ago

AlAnGeTo gravatar image

How would one define the domain of a symbolic variable to be rational? For a real variable a it would be var('a', domain='real') or var('a', domain='RR'). However, it seems that the domain can only be 'complex', 'real', 'positive' or 'integer'. Is there a reason for this and how would one get around this if one needs to define a rational variable?

Preview: (hide)

Comments

Maxima can declare some variables as rational or irrational, but this has not (yet) be implemented in Sage.

This might be a worthwhile addition for the parts of Sage that get subcontracted to Maxima. You may try to post on sage-devel...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2 years ago )