Paul,
Yes, I can confirm that this is currently a limitation of FriCAS. In
OpenAxiom however I get:
wsp...@debian:~$ open-axiom -nox
GCL (GNU Common Lisp) 2.6.7 CLtL1 Sep 1 2008 14:01:57
Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
Binary License: GPL due to GPL'ed components: (XGCL READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter
Use (help) to get some basic information on how to use GCL.
Temporary directory for compiler files set to /tmp/
OpenAxiom: The Open Scientific Computation Platform
Version: OpenAxiom 1.3.0-2009-06-07
Built on Monday June 8, 2009 at 13:21:11
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave OpenAxiom and return to shell.
-----------------------------------------------------------------------------
(1) -> characteristic()$PrimeField(7)
(1) 7
Type: NonNegativeInteger
(2) -> chr(field) == characteristic()$field
Type: Void
(3) -> chr(PrimeField(7))
Cannot compile a $-expression involving a local variable.
OpenAxiom will attempt to step through and interpret the code.
(3) 7
Type: PositiveInteger
(4) -> chr(Integer)
(4) 0
Type: NonNegativeInteger
So this is likely almost possible to FriCAS since they still have a
lot in common.
On the other hand it is kind of disappointing that the following Spad
code compiles without errors in both FriCAS and OpenAxiom:
-- char.spad --
)abbrev package CHARP CharPac
CharPac: with
char: Field -> NonNegativeInteger
== add
char(field:Field):NonNegativeInteger == characteristic()$field
-- --
but it does not work in either.
Regards,
Bill Page.
On Sun, Aug 23, 2009 at 5:31 PM, Paul Onions wrote:
>
> Hello,
>
> I've just started looking into FriCAS and was curious when I tried the
> following experiment:
>
> -> characteristic()$PrimeField(7)
> 7
>
> as expected, but
>
> -> chr(field) == characteristic()$field
> -> chr(PrimeField(7))
> There are no library operations named chr
>
> Does this mean that I can't pass domains as arguments to functions? I
> have read (skimmed may be a better word) through a fair bit of the
> documentation and don't recall seeing this limitation. I thought
> domains were first class objects too.
>
> Can anyone enlighten me, or point me to some relevant documentation?
>
> Thanks,
> Paul
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---