On Wednesday, January 15, 2020 at 7:09:29 AM UTC-8, David Roe wrote: > > > I'm not sure what kind of equality you would imagine, but if we defined > equality by something like "equal absolute precision and equal value modulo > that absolute precision" then you no longer have additive and > multiplicative inverses. For example, if x = 1 + O(3^18) then there is no > value of y so that x+y == 0. That's pretty devastating for thinking about > algebraic operations. > > There is also the more computer-science type equality: will these two numbers lead to the same results if substituted in otherwise identical computations. This can be relevant for testing algorithmic aspects of what you're doing. That means asking: do the elements have the same valuation, digits, and precision (i.e., are they represented by the same p-adic disc). This requires some kind of normalization of 0-centered discs to be well-defined.
I think at the moment you can get a tuple capturing this information by something like x.__reduce__()[1][1:][1:] but this is obviously not very robust if pickle formats change. I would have expected canonicalized construction parameters to be available efficiently somehow, but I didn't find an interface routine for it easily. (I don't have an immediate need for them and I could work around it if I did, but perhaps it's worth including -- and perhaps it's already there and I didn't find it). -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/6e66a6b2-b435-4a1c-9c42-18ea5d415a32%40googlegroups.com.