I am trying to use the Real Interval Field (RIF), which in principle
does exactly what I want.  But I cannot understand this:

sage: a=RIF(-1,1)
sage: a.diameter()
2.00000000000000
sage: [b.diameter() for b in a.bisection()]
[1.00000000000000, 1.00000000000000]
sage: [[c.diameter() for c in b.bisection()] for b in a.bisection()]
[[0.666666666666667, 0.500000000000000],
 [0.500000000000000, 0.666666666666667]]

I bisect an interval of length ("diameter") 2 twice, but 2 of the 4
pieces have diameter 2/3!  I assumed that the diameters of the output
of bisection() added to the original diameter, but this appears not to
be happening.  If this is not a bug then I don't understand something.

Perhaps this makes it clearer:

sage: a=RIF(-1,1)
sage: b=a.bisection()[0]
sage: c=b.bisection()[0]
sage: c.lower()
-1.00000000000000
sage: c.upper()
-0.500000000000000
sage: c.diameter()
0.666666666666667

I think that what I need is

sage: c.absolute_diameter()
0.500000000000000

but did not understand "diameter".  OK, so I have answered my own
question, but I think I might as well post it anyway!

John Cremona

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to