login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #156 Axiom crashes when compiling simple Taylor code revision 1 of 4

1 2 3 4
Editor:
Time: 2007/11/17 21:59:27 GMT-8
Note: Works with compiled functions

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

\begin{axiom}
u := operator 'u;

multidiff(expr, variable, count) == 
  if count > 0 then
    D(multidiff(expr, variable, count-1), variable)
  else
    expr
  
maketaylor(expr) ==
  series( n +-> multidiff(expr, x, n), x=0)
\end{axiom}

Can't run this one::

  !\begin{axiom}
  make_taylor(u(x))
  \end{axiom}

In fact, 'series' doesn't work as soon as it is wrapped in a function, no matter whether declared or not. While

\begin{axiom}
 series( (n:INT):EXPR INT +-> a^n, x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT)
\end{axiom}

works alright, the following fails::

  !\begin{axiom}
  maketaylor(x:Symbol):ANY == series( (n:INT):EXPR INT +-> a^n, x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT)
  \end{axiom}

From unknown Thu May 12 10:53:18 -0500 2005
From: unknown
Date: Thu, 12 May 2005 10:53:18 -0500
Subject: Works probably with patch from bug #136
Message-ID: <20050512105318-0500@page.axiom-developer.org>

Axiom doesn't crash with this patch.


Cheers

From unknown Thu May 12 11:14:17 -0500 2005
From: unknown
Date: Thu, 12 May 2005 11:14:17 -0500
Subject: Works with compiled functions
Message-ID: <20050512111417-0500@page.axiom-developer.org>

Sorry, this code works with or without this patch if you compile
the functions: ')set function compile on'
<br>
But
\begin{axiom}
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)

maketaylor(x)
\end{axiom}
Cheers

Submitted by : (unknown) at: 2007-11-17T21:59:27-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

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

axiom
u := operator 'u;
Type: BasicOperator?
axiom
multidiff(expr, variable, count) == if count > 0 then D(multidiff(expr, variable, count-1), variable) else expr
Type: Void
axiom
maketaylor(expr) == series( n +-> multidiff(expr, x, n), x=0)
Type: Void

Can't run this one:

  \begin{axiom}
  make_taylor(u(x))
  \end{axiom}

In fact, series doesn't work as soon as it is wrapped in a function, no matter whether declared or not. While

axiom
series( (n:INT):EXPR INT +-> a^n, x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT)
LatexWiki Image(1)
Type: UnivariatePuiseuxSeries?(Expression Integer,x,0)

works alright, the following fails:

  \begin{axiom}
  maketaylor(x:Symbol):ANY == series( (n:INT):EXPR INT +-> a^n, x=0)$GenerateUnivariatePowerSeries(INT, EXPR INT)
  \end{axiom}

Works probably with patch from bug #136 --unknown, Thu, 12 May 2005 10:53:18 -0500 reply
Axiom doesn't crash with this patch.

Cheers

Works with compiled functions --unknown, Thu, 12 May 2005 11:14:17 -0500 reply
Sorry, this code works with or without this patch if you compile the functions: )set function compile on
But
axiom
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. 1 old definition(s) deleted for function or rule maketaylor
Type: Void
axiom
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.
axiom
Compiling function maketaylor with type Symbol -> 
      UnivariateTaylorSeries(Expression Integer,x,0)
LatexWiki Image(2)
Type: UnivariateTaylorSeries?(Expression Integer,x,0)

Cheers