A colleague reported this, which looks like a bug to me.  This is in
Sage-5.1.rc0.  Note that g.prec() is only 19 though f.prec() is
Infinity.

John

  I'm not sure who to bother about this, so I thought I could ask you.
 Here is a version of a Sage behaviour (feature? bug?) that bit me
recently.

sage: R, x = PowerSeriesRing(ZZ, 'x', default_prec = 80).objgen()
sage: f = x + x^2
sage: f.parent()
Power Series Ring in x over Integer Ring
sage: f.parent().default_prec()
80
sage: g = 1/f
sage: g.parent()
Laurent Series Ring in x over Integer Ring
sage: g.parent().default_prec()
20     (??????)
sage: h = 1/2 * f
sage: h.parent()
Power Series Ring in x over Rational Field
sage: h.parent().default_prec()
80

That was a big surprise to me!  Sometimes the precision is carried
over to the new ring, and sometimes it isn't?  Now that I've found
this, I can catch it my code, but it does seem strange...  It seems
more reasonable for the precision to always be carried over?

Am I confused here?

best,

saul

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

Reply via email to