axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] typo in the guessing package pamphlet


From: Martin Rubey
Subject: Re: [Axiom-developer] typo in the guessing package pamphlet
Date: 08 Aug 2007 10:37:45 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Gabriel Dos Reis <address@hidden> writes:

> | 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?

Because I use it 16 times in mantepse.spad.pamphlet.  Moreover, at times I
experienced trouble when trying to compile code like

f: MyType -> MyComplicatedType

f(n: MyType): MyComplicatedType ==
  ...

but I cannot be sure whether this trouble was due to my imagination or not.


In any case,

>     f(#1, g(#1, #2))

is "equivalent" (modulo bugs in the compiler) to

>    x +-> f(x, (y, z) +-> g(y, z))

> However, I can't find a documentation for that.

I guess there is no documentation for that. Moreover, I would prefer to use

 x +-> f(x, (y, z) +-> g(y, z)),

since this is also the aldor way and using #1, #2, ... is stupid for several
reasons, but I experienced trouble at times.  Since I experienced lots of
trouble getting code to compile, and since I am rather a hacker than a
programmer, I didn't care and tried to get things done.

If you find out that 

 x +-> f(x, (y, z) +-> g(y, z))

works everywhere or in most situations, PLEASE do not hesitate to send patches.
Please send them to me directly or via axiom-developer, not to MathAction,
because I update MathAction from time to time, and then these patches might be
lost.


Many thanks,

Martin





reply via email to

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