2008/9/23 pong <[EMAIL PROTECTED]>: > > > I tried > > sage: A=matrix([[1,1],[2,3]]) > sage: A.eigenvalues() > [0.2679491924311228?, 3.732050807568878?] > > My question is why the last digit before ? in 0.2679491924311228? is > '8'? Shouldn't it be "7" according to > > sage: ch=characteristic_polynomial(A) > sage: solve(ch(x)==0,x) > [x == 2 - sqrt(3), x == sqrt(3) + 2] > sage: N(2-sqrt(3), digits=18) > 0.267949192431122706 > > > > > > >
Alternatively: sage: e1,e2= A.eigenvalues() sage: e1 0.2679491924311228? sage: e1.interval(ComplexIntervalField(53)) # the default is 53 bits precision 0.2679491924311228? sage: e1.interval(ComplexIntervalField(100)) 0.267949192431122706472553658494? sage: e1.interval(ComplexIntervalField(200)) 0.267949192431122706472553658494127633057194746189619371944193? i.e. e1 is a number of a type which is essentially infinite precision, and you can ask for it to any desired precision later. However I'm still not sure why the original display ends 8? and not 7?. The ? notatation was introduced quite recently, so I am not sure whether this is a feature or a bug. John Cremona --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---