Re: [sage-devel] Re: number field: exactness of result of abs

2018-10-26 Thread Nils Bruin
On Friday, October 26, 2018 at 9:07:58 AM UTC-7, Daniel Krenn wrote: > > What my troubles are, is that by using abs my computation gets inexact, > which I want to avoid at all cost. > (So I think I just have to treat CyclotomicFields etc. special) > > Yes, that indicates you are probably more in

Re: [sage-devel] Re: number field: exactness of result of abs

2018-10-26 Thread Daniel Krenn
Thank you for your detailed explaination. On 2018-10-25 11:09, John Cremona wrote: > Personally I cannot think of a reason why one would want this abs() to > be returned as an algebraic number, since the whole point of absolute > values in algebraic number theory is that they like in some completi

Re: [sage-devel] Re: number field: exactness of result of abs

2018-10-25 Thread John Cremona
In general number fields have many absolute values, one for each embedding into CC or RR or p-adic Qp. So, for z.abs() to be well defined someone must have decided on a default embedding, and in Sage this is only done (as far as I know) for quadratic fiellds , real and complex, and for cyclotomic

[sage-devel] Re: number field: exactness of result of abs

2018-10-24 Thread Volker Braun
On Wednesday, October 24, 2018 at 4:08:05 PM UTC+2, Daniel Krenn wrote: > > What is the reason, why this returns an inexact result and not something > in an exact ring like QQbar? Well abs() is real and positive, so QQbar might not be the first choice. Small orders are apparently special cased