Re: [fricas-devel] FriCAS for calculations in atomic scattering problems

2014-04-23 Thread Ralf Hemmecke
Waldek, I just commited fix for the bug to the repository, but note then even with fix you may prefer to use 'sqrt(-1)' insted of '%i' in rules, because '%i' does not match imaginary part of '2 + %i': complex pattern matching considers '%i' and '2 + %i' to be to distinct complex constants.

Re: [fricas-devel] FriCAS for calculations in atomic scattering problems

2014-04-23 Thread Waldek Hebisch
Ralf Hemmecke wrote: I just commited fix for the bug to the repository, but note then even with fix you may prefer to use 'sqrt(-1)' insted of '%i' in rules, because '%i' does not match imaginary part of '2 + %i': complex pattern matching considers '%i' and '2 + %i' to be to distinct

[fricas-devel] System error: The function /VERSIONCHECK is undefined.

2014-04-23 Thread Prof. Dr. Johannes Grabmeier
Compiled code (from last year) used to work, now after compiling a domain, I get the following error, any hints what was changed and now could be wrong in my code? (4) - )sh SC System error: The function /VERSIONCHECK is undefined. Mit freundlichen Grüßen Johannes Grabmeier Prof.

Re: [fricas-devel] System error: The function /VERSIONCHECK is undefined.

2014-04-23 Thread Waldek Hebisch
Johannes Grabmeier wrote: Compiled code (from last year) used to work, now after compiling a domain, = I get the following error, any hints what was changed and now could be wron= g in my code? (4) - )sh SC System error: The function /VERSIONCHECK is undefined. The

Re: [fricas-devel] FriCAS for calculations in atomic scattering problems

2014-04-23 Thread Ralf Hemmecke
On 04/23/2014 12:23 PM, Waldek Hebisch wrote: FriCAS treats '%i' and 'sqrt(-1)' as two almost unrelated things: '%i' is just a constant from base ring, while 'sqrt(-1)' is a kernel. Perfect. I suspected that the original Axiom developers did it right. Ralf -- You received this message

[fricas-devel] High order (generic) functions

2014-04-23 Thread jiazhaoconga
I have some problems when I try to have high order generic functions in Fricas: For example, 'plus' is a high order generic functions that takes two functions (f,g) and returns an (anonymous) function (with parameter x) that returns the sum of f(x) and g(x) : 1. Do it in REPL: plus (f,g) ==

Re: [fricas-devel] FriCAS for calculations in atomic scattering problems

2014-04-23 Thread a . a . letterbox
The problem is that the rule does not have the right type. Manual intervention is necessary. cut Ok, thanks. It works. Now, I'm still stuck with Jacobi-Anger expansionhttp://en.wikipedia.org/wiki/Jacobi–Anger_expansion Suppose I have an expression test_eqn := exp( sqrt(-1) * a * sin(

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread Bill Page
Strictly speaking the following commands to the interpreter plus (f,g) == x+-f(x)+g(x) and double n == n + n do not define functions but rather modes. A mode can stand for many possible functions. On the other hand plus(f:INT-INT,g:INT-INT):INT-INT == (x:INT):INT +- f(x)+g(x)

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread jiazhaoconga
On Wed, Apr 23, 2014 at 9:54 PM, Bill Page bill.p...@newsynthesis.org wrote: Strictly speaking the following commands to the interpreter plus (f,g) == x+-f(x)+g(x) and double n == n + n do not define functions but rather modes. A mode can stand for many possible functions.

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread Bill Page
On 23 April 2014 09:59, jiazhaoconga jiazhaoco...@gmail.com wrote: On Wed, Apr 23, 2014 at 9:54 PM, Bill Page bill.p...@newsynthesis.org wrote: Strictly speaking the following commands to the interpreter plus (f,g) == x+-f(x)+g(x) and double n == n + n do not define functions

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread jiazhaoconga
Hmmm... Acutally I really wouldn't expect this to work in the interpreter given what I know about it's design, but it seems OK in when using the compiler: (3) - h := plus2(double2,double2)$PLSPKG(FLOAT,FLOAT) (3) theMap(PLSPKG;plus2;3M;1!0,655)

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread Ralf Hemmecke
So that I can do 'h := plus2(double2,double2);h 4; h 3.5' without specify any type. May I ask, why this is so important to you? I mean not specifying types. Ralf -- You received this message because you are subscribed to the Google Groups FriCAS - computer algebra system group. To

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread Ralf Hemmecke
On 04/23/2014 04:41 PM, jiazhaoconga wrote: For example, D(compose(f,g)) == compose(D(f),g) * D(g) [without mention independent variable 'x'] which * is _*(f,g) == x+-f(x)*g(x) FriCAS can do this easily, but the point is that FriCAS needs to know about the types of f,

Re: [fricas-devel] FriCAS for calculations in atomic scattering problems

2014-04-23 Thread Ralf Hemmecke
If I simply define and use a rule exp_to_bessel_rule := rule exp( sqrt(-1) * z * sin(t) ) == besselJ( N, z ) * exp( sqrt( -1 ) * N * t ) exp_to_bessel_rule( test_eqn ) then I'll get expression with 2 identical summation indices ( 'N' in this case ), which is clearly not something

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread jiazhaoconga
That cannot work. You are basically asking that the system delays everything until you ask for a value. That is basically saying that all you do is untyped and only when you evaluate types will be tried to match. In other words, you basically move all the typing stuff from compiletime to

Re: [fricas-devel] fricas book.dvi

2014-04-23 Thread Ralf Hemmecke
Hi Bill, [breakdepth={10}] I thought that saved me, but look at the attached file. Compile it and then remove the first and last brace inside dmath and compile again. With outer { } there is no linebreak. :-( Obviously the breakdepth has rather to do with \left( and \right) or maybe just

Re: [fricas-devel] High order (generic) functions

2014-04-23 Thread Waldek Hebisch
jiazhaoconga wrote: Hmmm... Acutally I really wouldn't expect this to work in the interpreter given what I know about it's design, but it seems OK in when using the compiler: (3) - h := plus2(double2,double2)$PLSPKG(FLOAT,FLOAT) (3) theMap(PLSPKG;plus2;3M;1!0,655)