axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fricas-devel] Re: [Axiom-mail] A simple question


From: Alasdair McAndrew
Subject: Re: [fricas-devel] Re: [Axiom-mail] A simple question
Date: Sun, 3 Feb 2008 07:49:10 +1100

Clearly there's more going on here than a lummox like me can follow.  I would possibly argue, though, that in spite of Martin's explanation of why axiom presents n in factored form in my original _expression_:

for n in 10..30 repeat output [n, factor(2^n-1)]

it is axiom which is at fault, or at least the _expression_ parsing of it.  Since factor clearly is only applied to the second term in the list, it shouldn't be applied to the first.  And I shouldn't have to coerce n to type String, Symbol etc to force nonfactoring.

-Alasdair

On Feb 3, 2008 4:39 AM, Bill Page <address@hidden> wrote:
On 2/2/08, Alasdair McAndrew <address@hidden> wrote:
> Actually,
>
> for n in 10..30 repeat output [n::String, factor(2^n-1)]
>
> is probably the simplest.
>

Although this apparently produces the effect that you wanted I think
it is also a very poor notation to achieve this effect. To understand
why it is a bad choice you need to understand how Axiom assigns types
to various objects - this is very complicated and often quite
unexpected - even when it works. The problem is finding a good way to
write this that always works the way you expect.

Regards,
Bill Page.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]