|
|
last edited 10 years ago by test1 |
1 2 3 4 | ||
Editor: test1
Time: 2014/07/28 15:44:54 GMT+0 |
||
Note: |
added:
From test1 Mon Jul 28 15:44:54 +0000 2014
From: test1
Date: Mon, 28 Jul 2014 15:44:54 +0000
Subject:
Message-ID: <20140728154454+0000@axiom-wiki.newsynthesis.org>
Status: fix proposed => closed
When trying this code (that is probably buggy on some level), axiom simply crashes on me without any comment. I'm using the Debian (Ubuntu) build of 20050201
(1) -> u := operator 'u;
multidiff(expr,variable, count) == if count > 0 then D(multidiff(expr, variable, count-1), variable) else expr
make_taylor(expr) == series( n +-> multidiff(expr,x, n), x=0)
Can't run this one::
make_taylor(u(x))
Compiling function multidiff with type (Expression(Integer),Variable(x), Integer) -> Expression(Integer)
Compiling function make_taylor with type Expression(Integer) -> Any
(1) |
In fact, series
doesn't work as soon as it is wrapped in a function, no matter whether declared or not. While
series( (n:INT):EXPR INT +-> a^n,x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT)
(2) |
works alright, the following fails::
make_taylor(x:Symbol):ANY == series( (n:INT):EXPR INT +-> a^n,x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT)
Function declaration make_taylor : Symbol -> Any has been added to workspace. Compiled code for make_taylor has been cleared. 1 old definition(s) deleted for function or rule make_taylor
Cheers
Sorry, this code works with or without this patch if you compile the functions:)set function compile on
maketaylor(x:Symbol):UnivariateTaylorSeries(Expression Integer,x, 0) == aa:=series( (n:INT):EXPR INT +-> a^n, x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT) aa::UnivariateTaylorSeries(Expression Integer, x, 0)
Function declaration maketaylor : Symbol -> UnivariateTaylorSeries( Expression(Integer),x, 0) has been added to workspace.
maketaylor(x)
Cannot compile conversion for types involving local variables. In particular,could not compile the expression involving :: UnivariateTaylorSeries(Expression(Integer), #1, 0) FriCAS will attempt to step through and interpret the code.
Compiling function maketaylor with type Symbol -> UnivariateTaylorSeries(Expression(Integer),x, 0)
(3) |
Cheers
Category: Axiom Compiler => Axiom Interpreter Status: open => fix proposed Status: fix proposed => closed