On Mon, Oct 24, 2011 at 8:54 AM, Gabriel Dos Reis <[email protected]> wrote:
> ...
> Now, consider the capsule-level variable "power".  It is declared as
>
>           power:PrimitiveArray(%)
>
> then later assigned to as
>
>           power := new(0,0)
>
> There are two lexical occurences of the literal '0' in there.  Can you
> guess, which one is which?  There are at least five interpretations for
> each constant:
>
>      0: R   -- the parameter R satisfies Ring
>      0: Rep -- the parameter Rep satisfies UnivariatePolynomialCategory(R)
>      0: %   -- the current domains satisfies same
>      0: NonNegativeInteger
>      0: Integer
>
>
> That this domain compiles at all is mysterious; it happens to depend on
> a very obscure implementation detail of AXIOM compilers, one that is not
> advertised at all -- and I don't think it should.
> It is voodoo.  So, I am calling it Johannes's Rep voodoo :-).
>

I think that originally in Axiom the assignment above would be treated
like this:

  power := new(Zero(),Zero())

So 0 would be resolved by the standard mechanism of function
selection, right? I rather like this approach and sometimes wonder how
it could be extended to all constants.

If I understand correctly recently you have submitted some patches
that begin to remove the special treatment of constants 0 and 1 as
unary functions Zero and One. This seems to be going in the other
direction.

Comment?

Regards,
Bill Page.

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