[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Al
From: |
Bill Page |
Subject: |
Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation |
Date: |
Wed, 8 Aug 2007 03:19:43 -0400 |
On 08 Aug 2007 06:56:46 +0200, Martin Rubey wrote:
> Gabriel Dos Reis writes:
> ...
> > More specifically:
> >
> > * short hand for unnamed functions do not work properly, so one has
> > to use the syntax x +-> f(x)
>
> Could you tell me in what places that happens, and what "do not work properly"
> means exactly? I depend on unnamed functions quite a bit, since at a few
> points I actually construct such functions by code. I do recall vividly that
> these functions were extremely hard to compile.
Well, just picking an example at random from your code (not
necessarily one that compiled with errors):
In mantepse.spad.pamphlet chunk <<implementation: Guess - Hermite-Pade
- Operators>>=
...
diffHP(q: Symbol): (LGOPT -> HPSPEC) ==
if displayAsGF(#1)$GOPT0 then
partitions := FilteredPartitionStream #1
[ADEguessStream(#1, partitions, qDiffDS(q, #1, #2), 1$UFPSF), _
repeating([0$NNI])$Stream(NNI), _
ADEtestStream(#1, partitions, qDiffDSF(q, #1, #2), 1$UFPSSUPF), _
ADEEXPRRStream(#1, #2, partitions, qDiffDX(q, #1, #2,
#3), diff1X), _
diffA, diffAF, diffAX, diffC]$HPSPEC
else
error "Guess: guessADE supports only displayAsGF"
----
where reference is made to the following definitions:
LGOPT ==> List GuessOption
HPSPEC ==> Record(guessStream: UFPSF -> Stream UFPSF,
degreeStream: Stream NNI,
testStream: UFPSSUPF -> Stream UFPSSUPF,
exprStream: (EXPRR, Symbol) -> Stream EXPRR,
A: DIFFSPECA,
AF: DIFFSPECAF,
AX: DIFFSPECAX,
C: DIFFSPECC)
UFPSF ==> UnivariateFormalPowerSeries F
ADEguessStream(f: UFPSF, partitions: Stream List Integer,
DS: DIFFSPECS, D1: DIFFSPEC1): Stream UFPSF ==
map(termAsUFPSF(f, #1, DS, D1), partitions)
$StreamFunctions2(List Integer, UFPSF)
---
Why do you use macros for types like HPSPEC?
What do expect the meaning of #2 and #3 to be?
As I understand Spad syntax, if I write
( #1 + #2 + #3 )
this is a shorthand for the following anonymous function
(x,y,z) +-> x + y + z
Is that correct? Perhaps not since with this definition I can not make
sense of your code.
For example, where you write above:
[ADEguessStream(#1, partitions, qDiffDS(q, #1, #2), 1$UFPSF), ... ]
we could rewrite this as:
(x,y,z) +-> [ADEguessStream(x, partitions, qDiffDS(q, x, y), 1$UFPSF),...]
but the first component of HPSPEC is
guessStream: UFPSF -> Stream UFPSF
which seems to require a function with a single argument.
Also from diffHP we were supposed to return a function
LGOPT -> HPSPEC
But the code apparently implies a function with 3 arguments.
Could you give an alternate explanation that makes better sense?
> ...
Regards,
Bill Page.
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, (continued)
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Bill Page, 2007/08/07
- adding new algebra, was: Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Martin Rubey, 2007/08/07
- Re: adding new algebra, was: Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Bill Page, 2007/08/07
- Re: adding new algebra, was: Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Martin Rubey, 2007/08/07
- Re: adding new algebra, was: Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Bill Page, 2007/08/07
- Re: adding new algebra, was: Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Gabriel Dos Reis, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Gabriel Dos Reis, 2007/08/07
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Gabriel Dos Reis, 2007/08/07
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Martin Rubey, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Gabriel Dos Reis, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation,
Bill Page <=
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Gabriel Dos Reis, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, Martin Rubey, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, Gabriel Dos Reis, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Bill Page, 2007/08/08
Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, Waldek Hebisch, 2007/08/22