From kreckel at thep.physik.uni-mainz.de Sat Mar 1 20:01:20 2003 From: kreckel at thep.physik.uni-mainz.de (Richard B. Kreckel) Date: Sat, 1 Mar 2003 20:01:20 +0100 (CET) Subject: here we go... Message-ID: This is to let folks know that Christian Bauer-san has just rolled the release of GiNaC-1.0.14 of which the only thing we know is that it works for him (tm). Can't ask him any more details. He just left the room. Hope he's fetching the champagne. Wait, I can do better and cite the NEWS file: * Improved the C-source output: complex numbers are printed correctly (using the STL complex<> template or cln::complex()), rational numbers use cl_RA() in the CLN output, and small integers are printed in a more compact format (e.g. "2.0" instead of "2.0000000e+00"). * function_options::set_return_type() and function_options::do_not_evalf_params() now actually work. Enjoy -richy. -- Richard B. Kreckel From chrisd at sci.kun.nl Wed Mar 5 12:39:52 2003 From: chrisd at sci.kun.nl (Chris Dams) Date: Wed, 5 Mar 2003 11:39:52 +0000 (UTC) Subject: patch for subs_algebraic Message-ID: Hello, I discovered that the subs_algebraic subs_option does not yet go into subexpressions. The attached patch makes this happen. Furthermore nummatches was made into an int (it was an unsigned) because the unsigned was not used anyway and the static_cast to integer that was introduced in version 1.66.2.13 of mul.cpp completely kills subs_algebraic. I.e., it converts the maximum unsigned integer to -1, which is not good. Greetings, Chris Dams -------------- next part -------------- ? .deps ? .libs ? Makefile ? Makefile.in ? exprseq.cpp ? exprseq.h ? function.cpp ? function.h ? indexed.cpp.modified ? indexed.cpp.patch ? input_lexer.cc ? input_parser.cc ? input_parser.cpp.cc ? input_parser.h ? libginac.la ? log ? lst.cpp ? lst.h ? matrix.cpp.changed ? matrix.h.changed ? numeric.cpp.modified ? numeric.cpp.patch ? patch ? printmul.patch ? substhings ? version.h Index: expairseq.cpp =================================================================== RCS file: /home/cvs/GiNaC/ginac/expairseq.cpp,v retrieving revision 1.61.2.13 diff -r1.61.2.13 expairseq.cpp 400,403c400 < { < if ((options & subs_options::subs_algebraic) && is_exactly_a(*this)) < return static_cast(this)->algebraic_subs_mul(ls, lr, options); < --- > { 406a404,405 > else if ((options & subs_options::subs_algebraic) && is_exactly_a(*this)) > return static_cast(this)->algebraic_subs_mul(ls, lr, options); Index: mul.cpp =================================================================== RCS file: /home/cvs/GiNaC/ginac/mul.cpp,v retrieving revision 1.66.2.14 diff -r1.66.2.14 mul.cpp 521,522c521,522 < bool tryfactsubs(const ex & origfactor, const ex & patternfactor, unsigned & nummatches, lst & repls) < { --- > bool tryfactsubs(const ex & origfactor, const ex & patternfactor, int & nummatches, lst & repls) > { 559c559 < if (newnummatches < static_cast(nummatches)) --- > if (newnummatches < nummatches) 565c565 < { --- > { 573c573 < unsigned nummatches = std::numeric_limits::max(); --- > int nummatches = std::numeric_limits::max(); 612c612 < unsigned nummatches = std::numeric_limits::max(); --- > int nummatches = std::numeric_limits::max(); Index: power.cpp =================================================================== RCS file: /home/cvs/GiNaC/ginac/power.cpp,v retrieving revision 1.74.2.14 diff -r1.74.2.14 power.cpp 527c527 < extern bool tryfactsubs(const ex &, const ex &, unsigned &, lst &); --- > extern bool tryfactsubs(const ex &, const ex &, int &, lst &); 530,540c530 < { < if (options & subs_options::subs_algebraic) { < for (size_t i=0; i::max(); < lst repls; < if (tryfactsubs(*this, ls.op(i), nummatches, repls)) < return (ex_to((*this) * power(lr.op(i).subs(ex(repls), subs_options::subs_no_pattern) / ls.op(i).subs(ex(repls), subs_options::subs_no_pattern), nummatches))).basic::subs(ls, lr, options); < } < return basic::subs(ls, lr, options); < } < --- > { 544,547c534,535 < if (are_ex_trivially_equal(basis, subsed_basis) < && are_ex_trivially_equal(exponent, subsed_exponent)) < return basic::subs(ls, lr, options); < else --- > if (!are_ex_trivially_equal(basis, subsed_basis) > || !are_ex_trivially_equal(exponent, subsed_exponent)) 548a537,549 > > if(!(options & subs_options::subs_algebraic)) > return basic::subs(ls, lr, options); > > for (size_t i=0; i int nummatches = std::numeric_limits::max(); > lst repls; > if (tryfactsubs(*this, ls.op(i), nummatches, repls)) > return (ex_to((*this) * power(lr.op(i).subs(ex(repls), subs_options::subs_no_pattern) / ls.op(i).subs(ex(repls), subs_options::subs_no_pattern), nummatches))).basic::subs(ls, lr, options); > } > > ex result=basic::subs(ls, lr, options); > return result; From Christian.Bauer at Uni-Mainz.DE Wed Mar 5 16:13:50 2003 From: Christian.Bauer at Uni-Mainz.DE (Christian Bauer) Date: Wed, 5 Mar 2003 16:13:50 +0100 Subject: patch for subs_algebraic In-Reply-To: References: Message-ID: <20030305151349.GB363@thep.physik.uni-mainz.de> Hi! On Wed, Mar 05, 2003 at 11:39:52AM +0000, Chris Dams wrote: > I discovered that the subs_algebraic subs_option does not yet go into > subexpressions. The attached patch makes this happen. Yup. > [...] the static_cast to integer that was introduced in > version 1.66.2.13 of mul.cpp completely kills subs_algebraic. Oops. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ From skavhaug at simula.no Mon Mar 10 13:57:55 2003 From: skavhaug at simula.no (Ola Skavhaug) Date: Mon, 10 Mar 2003 13:57:55 +0100 Subject: Bug in diff Message-ID: <20030310125755.GB4873@kamapuaa.simula.no> Hi. I think I've encountered a bug in GiNaC-1.0.13 (on a Debian Linux machine) In ginsh: > diff(sqrt((-sin((x)))^(2.0)),x); (1.0+5.0165576136843360246E-20*I)*sin(x)*cos(x)*((-sin(x))^(2.0))^(-1/2) The answer should be: sin(x)*cos(x)*((-sin(x))^(2.0))^(-1/2) I have not tried to figure out why this happens (perhaps an uninitialized variable?) I've compiled ginac by myself, using cln-1.1.5 (gcc 3.2 compiler) Sincerely, -- Ola Skavhaug, Simulant, stipendiot og enkel gutt fra landet. From Christian.Bauer at Uni-Mainz.DE Wed Mar 19 19:37:11 2003 From: Christian.Bauer at Uni-Mainz.DE (Christian Bauer) Date: Wed, 19 Mar 2003 19:37:11 +0100 Subject: GiNaC 1.1 API freeze Message-ID: <20030319183710.GB1600@thep.physik.uni-mainz.de> Hi! We plan to release GiNaC 1.1.0 by the end of next week. It will become the new "stable" branch, and any new and exciting experimental stuff will then go into 1.2. Further development of 1.0.x will be limited to bugfixes. The idea is to keep the programming interfaces compatible across all versions of 1.1.x, as it has been the case for 1.0.x, so should there be anyone who has cause why the current 1.1 CVS should not become the 1.1 release version (suggestions for parameter/return type changes, useful additional methods etc.), they must speak now or forever hold their peace. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/