On 2016-10-24 17:54, Nils Bruin wrote:
Pow is not *that* special.
It is more special than you think. Currently, powering does not go
through the coercion framework at all. So actions won't get looked up...
Of course, this could be changed. However, the *default* implementation
of all
On Sunday, October 23, 2016 at 11:33:21 PM UTC-7, Ralf Stephan wrote:
>
>
> Since you say pow is special we can fix this for the special case
> exponent in QQbar. Useful?
>
Pow is not *that* special. Sage does have the notion of "actions" in the
coercion framework. The map discovery framework
Please review
https://trac.sagemath.org/ticket/21754
On Monday, October 24, 2016 at 8:44:35 AM UTC+2, vdelecroix wrote:
>
> On 24 October 2016 at 08:33, Ralf Stephan
> wrote:
> > On Monday, October 24, 2016 at 8:03:37 AM UTC+2, vdelecroix wrote:
> >>
> >> Something like
On 24 October 2016 at 08:33, Ralf Stephan wrote:
> On Monday, October 24, 2016 at 8:03:37 AM UTC+2, vdelecroix wrote:
>>
>> Something like this. But then it is not possible to do anything with
>> this expression (like numerical approximation)...
>
>
> Since you say pow is
On Monday, October 24, 2016 at 8:03:37 AM UTC+2, vdelecroix wrote:
>
> Something like this. But then it is not possible to do anything with
> this expression (like numerical approximation)...
>
Since you say pow is special we can fix this for the special case
exponent in QQbar. Useful?
--
On 24 October 2016 at 07:58, Ralf Stephan wrote:
> On Sunday, October 23, 2016 at 6:33:30 PM UTC+2, vdelecroix wrote:
>>
>> But it would be better with SR(2) ^ SR(QQbar(3).sqrt() +
>> QQbar(2).sqrt()) working
>
>
> You mean this?
> sage: SR(2).power(SR(QQbar(3).sqrt() +
On Sunday, October 23, 2016 at 6:33:30 PM UTC+2, vdelecroix wrote:
>
> But it would be better with SR(2) ^ SR(QQbar(3).sqrt() +
> QQbar(2).sqrt()) working
>
You mean this?
sage: SR(2).power(SR(QQbar(3).sqrt() + QQbar(2).sqrt()), hold=True)
2^3.146264369941973?
--
You received this message
But it would be better with SR(2) ^ SR(QQbar(3).sqrt() +
QQbar(2).sqrt()) working
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
On 2016-10-23 10:33, Vincent Delecroix wrote:
In general, pow(a, b) should only depend on parent(a) and parent(b)
and not the actual values of a and b. This is how behave all
arithmetic operations.
+1
I don't see it as a problem that 2^QQbar(1) fails.
--
You received this message because you
On 23 October 2016 at 08:05, Ralf Stephan wrote:
> 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
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.
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
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
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
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
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
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
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
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
19 matches
Mail list logo