# Problem with assumption (in RR)

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello,

The following code returns the value "False", and I don't understand why. Does 'assume' and 'in RR' work fine together ?

sage: var('alpha')
sage: assume(alpha,'real')
sage: alpha in RR
False


Thank you by advance Please excuse me for the mistakes, I'm French.

edit retag close merge delete

Sort by » oldest newest most voted

When you write var('alpha') you define a symbolic variable, whose role is to serve as an indeterminate in symbolic expressions such as exp(alpha)/log(alpha+pi). When you write assume(alpha,'real'), you add the hint that this symbolic variable serves as a real indeterminate, the system can use this information during its computations (e.g. when simplifying formulas).

Despite its generic name, RR is not an abstraction representing the reals, but one of the available approximations of the real field, namely RR is made of floating-point numbers with 53 bits of precision, so we are quite far from the symbolic ring, in particular, there is no way to transform a symbol into a floating-point number.

more