[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: |
Gabriel Dos Reis |
Subject: |
Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation |
Date: |
Wed, 8 Aug 2007 03:18:21 -0500 (CDT) |
On Wed, 8 Aug 2007, Bill Page wrote:
| 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?
I think so.
Note however, that in nested context, I believe the rules are a bit different.
That is:
f(#1, g(#1, #2))
would be equivalent to
x +-> f(x, (y, z) +-> g(y, z))
However, I can't find a documentation for that.
-- Gaby
- adding new algebra, was: Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation, (continued)
- 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, 2007/08/08
- Re: [Axiom-developer] typo in the guessing package pamphlet, was: Re: Algebra and literate documentation,
Gabriel Dos Reis <=
- 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