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

"Alasdair McAndrew" <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
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 <[email protected]> wrote:

> On 2/2/08, Alasdair McAndrew <[email protected]> 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.
>

_______________________________________________
Axiom-mail mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-mail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.