Rational variable

asked 2022-10-12 03:43:59 +0200

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?

edit retag flag offensive close merge delete

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 ( 2022-10-15 22:43:43 +0200 )edit