I do want to convert to an integer in this particular case...but
integers are rationals, so I don't understand why I don't just get the
integer 344 when I try the following code:
sage: K=Qp(7,5)
sage: Q=QQ
sage: a=344
sage: b=K(a)
sage: a=Q(b)
--
To post to this group, send email to
Here is the code that can be pasted into sage to produce the error:
sage: K=Qp(7,5)
sage: Q=QQ
sage: a=344
sage: b=K(a)
sage: a=Q(b)
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For
On Jun 16, 7:22 am, Mel chemmyg...@gmail.com wrote:
I do want to convert to an integer in this particular case...but
integers are rationals, so I don't understand why I don't just get the
integer 344 when I try the following code:
If you are sure that the element can be represented as an
As I said previously, you are only going to reconstruct RATIONALs with
num,den less than sqrt((1/2)*p^k), i.e. 92 in this case. It is true
that the integers are a subset of the rationals, but the convert to
integer problem is not a sub-problem of the convert to rational
problem.
On Jun 16, 3:22
I know very little about SAGE, but surely the point is that this is
not well-defined:
what rational were you expecting? You can only guarantee to get a
number with (num,den)
sqrt(p^k/2), and there isn't one, as 1 itself doesn't work.
Did you wnat to convert to integer?
On May 26, 1:53 am, Mel