On 10/27/2008 12:55 PM, Bill Page wrote:
> On Mon, Oct 27, 2008 at 4:41 AM, Ralf Hemmecke wrote:
>>>> (12) -> vl : List Symbol := [x,y]
>>>>
>>>>    (12)  [x,y]
>>>>             Type: List(Symbol)
>>>> (13) -> p:DMP(vl,Integer):=1
>>>>
>>>>    (13)  1
>>>>             Type: DistributedMultivariatePolynomial([x,y],Integer)
>>> But what is the type of the right hand side of (13)?
>> That is easy: DMP(vl,INT). Note that the 1 does appear in some context.
> 
> Are you sure that is what is happening here? What is the type of the rhs 
> below?
> 
>   (13') -> p:DMP(vl,Integer):=2

If I were in a "aldor -gloop" I would guess, that this will not be 
accepted by the compiler, because DMP does not have a function integer: 
Literal->%. But here we are in the FriCAS interpreter and that is more 
liberal. I guess, it adds some invisible coercions.

%1 >> #include "algebra"
                                            Comp: 460 msec, Interp: 0 msec
%2 >> #include "aldorinterp"
                                            Comp: 60 msec, Interp: 0 msec
%3 >> Z ==> Integer
                                            Comp: 0 msec, Interp: 0 msec
%4 >> P ==> SparseUnivariatePolynomial Z
                                            Comp: 0 msec, Interp: 0 msec
%5 >> p:P := 1
1 @ SparseUnivariatePolynomial(AldorInteger)
                                            Comp: 480 msec, Interp: 270 msec
%6 >> q:P := 2
       .......^
[L6 C8] #1 (Error) No meaning for integer-style literal `2'.

Note that 1 is in the exports of P but not 2.

Ralf


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to