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: Ralf Hemmecke
Subject: Re: [fricas-devel] Re: [Axiom-mail] A simple question
Date: Thu, 07 Feb 2008 09:54:31 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20071031)

Hi Alasdair,

On 02/02/2008 09:49 PM, Alasdair McAndrew wrote:
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

I am partially on your side. If the above command outputs n in factored form, that should be more or less considered as a bug. (Though it is not as Martin explained.)

However, the function output actually requires something of type OutputForm as input. What you give, is not of that type, it is not even a list as Martin explained (you wanted a Record anyway). That basically leaves the interpreter with not enough information from you to do exactly what you wanted. So the interpreter tries to do its best to guess what you wanted. You cannot blame the guesser to be wrong if he has but one choice. And (mathematically seen) the output from the above command is not wrong. Why should a factored n be different from n?

Why I think that this is a bug is that Axiom should have output nothing but rather have stopped with an error message that there is no function [...] which takes an integer and a factored integer as input.

Ralf





reply via email to

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