I think you want the RealIntervalField.  For exampe:

sage: a = RIF(0,1)
sage: b = RIF(.5,pi)
sage: a.overlaps(b)


-M. Hampton

On Dec 9, 8:16 am, Laurent Claessens <moky.m...@gmail.com> wrote:
>   Hi
> I would like to work with sets that are real intervals or combinations
> of them : mainly intersection and union.
> Example :
> [0,1] intersection with [0.5 , pi]
> Using the Sage Reference Manual 4.1.1, I was able to do that :
> sage:A=Set(RealField())
> sage: sqrt(2) in A
> True
> So it is possible to consider parts of R as sets. How can I build an
> interval ?
> Have a good day
> Laurent Claessens
> PS : I send this message by email on December, 4. Since I did not even
> saw my message appearing, I decided to repost it from the GoogleGroup
> online interface. I'm wrong in doing that ?

To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 
URL: http://www.sagemath.org

Reply via email to