Re: [sage-support] QQbar coercion question

2016-10-22 Thread Jeroen Demeyer
On 2016-10-22 10:37, Ralf Stephan wrote: | sage:2*(QQbar(1)) 2 sage:2^(QQbar(1)) ... TypeError:nocanonical coercion fromAlgebraicFieldto RationalField | Why does the one work, the other not? Multiplication uses coercion. Exponentiation does not use coercion, since that's usually not what you

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
On Saturday, October 22, 2016 at 6:28:58 PM UTC+2, vdelecroix wrote: > > ... The behavior of any operation in Sage is that > the parent of op(a, b) should only depend on the operator op, > parent(a) and parent(b). Powers are a bit special but not enough to > use conversion instead of coercion.

Re: [sage-support] Re: 'ascii' codec can't decode byte 0xef in position 281

2016-10-22 Thread v_2e
On Sat, 22 Oct 2016 13:18:12 -0700 (PDT) Volker Braun wrote: > Thats definitely a SageNB bug, though afaik nobody is maintaining > that. My recommendation would be to use "sage --notebook=jupyter" > instead. > Perhaps I could try to do that. Is there some guide on replacing the Sage Notebook ser

[sage-support] Re: 'ascii' codec can't decode byte 0xef in position 281

2016-10-22 Thread Volker Braun
Thats definitely a SageNB bug, though afaik nobody is maintaining that. My recommendation would be to use "sage --notebook=jupyter" instead. On Saturday, October 22, 2016 at 6:12:03 PM UTC+2, v_...@ukr.net wrote: > > Hello! > I use the Sage Notebook on my server with Sage v.7.4. And each ti

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Vincent Delecroix
On 22 October 2016 at 19:08, John Cremona wrote: > On 22 October 2016 at 17:28, Vincent Delecroix > <20100.delecr...@gmail.com> wrote: >> On 22 October 2016 at 16:10, Ralf Stephan wrote: >>> On Saturday, October 22, 2016 at 4:04:55 PM UTC+2, John Cremona wrote: So Ralf, do you want to

Re: [sage-support] QQbar coercion question

2016-10-22 Thread John Cremona
On 22 October 2016 at 17:28, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > On 22 October 2016 at 16:10, Ralf Stephan wrote: >> On Saturday, October 22, 2016 at 4:04:55 PM UTC+2, John Cremona wrote: >>> >>> So Ralf, do you want to catch the case where the exponent in QQbar is >>> actually

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Vincent Delecroix
On 22 October 2016 at 16:10, Ralf Stephan wrote: > On Saturday, October 22, 2016 at 4:04:55 PM UTC+2, John Cremona wrote: >> >> So Ralf, do you want to catch the case where the exponent in QQbar is >> actually rational and then do what QQbar already knows how to do >> (raise to a rational power),

[sage-support] 'ascii' codec can't decode byte 0xef in position 281

2016-10-22 Thread v_2e
Hello! I use the Sage Notebook on my server with Sage v.7.4. And each time I try to open some TXT file in the DATA folder I get the error message in the web interface 500: Internal server error. And in the terminal where I started the Sage server, I see this error message: ===

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
On Saturday, October 22, 2016 at 4:04:55 PM UTC+2, John Cremona wrote: > > So Ralf, do you want to catch the case where the exponent in QQbar is > actually rational and then do what QQbar already knows how to do > (raise to a rational power), returning an element of QQbar; and raise > an Error

Re: [sage-support] QQbar coercion question

2016-10-22 Thread John Cremona
On 22 October 2016 at 14:44, William Stein wrote: > On Sat, Oct 22, 2016 at 6:11 AM, John Cremona wrote: >> On 22 October 2016 at 09:37, Ralf Stephan wrote: >>> sage: 2*(QQbar(1)) >>> 2 >>> sage: 2^(QQbar(1)) >>> ... >>> TypeError: no canonical coercion from Algebraic Field to Rational Field >>>

Re: [sage-support] QQbar coercion question

2016-10-22 Thread William Stein
On Sat, Oct 22, 2016 at 6:11 AM, John Cremona wrote: > On 22 October 2016 at 09:37, Ralf Stephan wrote: >> sage: 2*(QQbar(1)) >> 2 >> sage: 2^(QQbar(1)) >> ... >> TypeError: no canonical coercion from Algebraic Field to Rational Field >> >> Why does the one work, the other not? Is it a bug? > > I

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
I see, you're thinking algebraically not computationally. The latter view would try to convert to QQ, and only then try to coerce, in order to catch the rational case first and not give an error where none is expected. On Saturday, October 22, 2016 at 3:11:50 PM UTC+2, John Cremona wrote: > > On 2

Re: [sage-support] QQbar coercion question

2016-10-22 Thread John Cremona
On 22 October 2016 at 09:37, Ralf Stephan wrote: > sage: 2*(QQbar(1)) > 2 > sage: 2^(QQbar(1)) > ... > TypeError: no canonical coercion from Algebraic Field to Rational Field > > Why does the one work, the other not? Is it a bug? I don't see that as a bug. Any product of an integer and an elemen

[sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
sage: 2*(QQbar(1)) 2 sage: 2^(QQbar(1)) ... TypeError: no canonical coercion from Algebraic Field to Rational Field Why does the one work, the other not? Is it a bug? Regards, -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from