Hi Francois,
On 10/09/2008 12:43 PM, Francois Maltey wrote:
> Hello,
>
> The way (in mathematic or pure informatic) I prefer is
>
> fct := x +-> (y +-> gcd (x, y))
> fct 4 --- is an anonymous function
> (fct 4) 6 -- or fct 4 6 with right priority should be 2.
Oooops.
FriCAS (AXIOM fork) Computer Algebra System
Version: FriCAS 2008-05-28
Timestamp: Sunday August 3, 2008 at 12:47:11
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
(1) ->
(1) -> fct := x +-> (y +-> gcd (x, y))
(1) x +-> y +-> gcd(x,y)
Type: AnonymousFunction
(2) -> fct 4
(2) y +-> gcd(G1403,y)
Type: AnonymousFunction
(3) -> g := fct 4
(3) y +-> gcd(G1414,y)
Type: AnonymousFunction
(4) -> g 6
(4) 1
Type: Polynomial Integer
(5) ->
Loos a bit wrong. Also the type is not quite what I would expect. :-(
(5) -> (fct 4) 6
>> System error:
Caught fatal error [memory may be damaged]
That is certainly not acceptable.
FriCAS (AXIOM fork) Computer Algebra System
Version: FriCAS 2008-05-28
Timestamp: Sunday August 3, 2008 at 12:47:11
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
(1) ->
(1) -> f: Integer-> Integer->Integer := x+->(y+->gcd(x,y))
(1) theMap(*1;anonymousFunction;0;frame0;internal)
Type: (Integer -> (Integer ->
Integer))
(2) -> g := f 4
(2) theMap(*1;anonymousFunction;1;frame0;internal)
Type: (Integer ->
Integer)
(3) -> g 6
>> System error:
Caught fatal error [memory may be damaged]
Hmmm. Let's try this...
(13) -> u(x:Integer): Integer->Integer==(y:Integer):Integer+->gcd(x,y)
Type: Void
(14) -> (u 4) 6
(14) 2
Type: PositiveInteger
(15) -> u.4.6
(15) 2
Ralf
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-axiom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel