Hi, the behavior of function 'has' in ginsh seems inexplicable: ginsh - GiNaC Interactive Shell (GiNaC V1.0.8) __, _______ Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, (__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY. ._) i N a C | You are welcome to redistribute it under certain conditions. <-------------' For details type `warranty;'. Type ?? for a list of help topics.
has(b*x*x^a, $0*$1*$1^$2); 1 has(c*x*x^a, $0*$1*$1^$2); 1 has(d*x*x^a, $0*$1*$1^$2); 1 has(e*x*x^a, $0*$1*$1^$2); 0 has(f*x*x^a, $0*$1*$1^$2); 1 has(g*x*x^a, $0*$1*$1^$2); 1 has(h*x*x^a, $0*$1*$1^$2); 1 has(i*x*x^a, $0*$1*$1^$2); 0 has(l*x*x^a, $0*$1*$1^$2); 1 exit;
Then I cosed and opened again ginsh and ... Type ?? for a list of help topics.
has(e*x*x^a, $0*$1*$1^$2); 1 has(f*x*x^a, $0*$1*$1^$2); 1 has(g*x*x^a, $0*$1*$1^$2); 1 has(h*x*x^a, $0*$1*$1^$2); 0 has(i*x*x^a, $0*$1*$1^$2); 1 has(l*x*x^a, $0*$1*$1^$2); 1 has(m*x*x^a, $0*$1*$1^$2); 1 has(n*x*x^a, $0*$1*$1^$2); 0 has(o*x*x^a, $0*$1*$1^$2); 1 exit; [zolo@sandbox zolo]$ ginsh ginsh - GiNaC Interactive Shell (GiNaC V1.0.8) __, _______ Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, (__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY. ._) i N a C | You are welcome to redistribute it under certain conditions. <-------------' For details type `warranty;'.
Type ?? for a list of help topics.
has(h*x*x^a, $0*$1*$1^$2); 1 has(i*x*x^a, $0*$1*$1^$2); 1 has(l*x*x^a, $0*$1*$1^$2); 1 has(m*x*x^a, $0*$1*$1^$2); 0 has(n*x*x^a, $0*$1*$1^$2); 1
Furthermore, with the number it says always false, is it right?
has(2*x*x^a, $0*$1*$1^$2); 0 has((-2)*x*x^a, $0*$1*$1^$2); 0 has(sqrt(2)*x*x^a, $0*$1*$1^$2); 0
Thank you very much. Best regards Tatiana Zolo
Hi! On Thu, May 09, 2002 at 10:58:34AM +0200, Tatiana Zolo wrote:
the behavior of function 'has' in ginsh seems inexplicable:
Using more than one wildcard in a sum or product leads to unpredictable results because of GiNaC's term reordering. That's by design. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
participants (2)
-
Christian Bauer
-
Tatiana Zolo