Richard Kreckel [Wed, 15 Aug 2001 21:16:19 +0000 (21:16 +0000)]
- remove some explicit accesses to ex::bp by replacing with ex_to<>().
- log_series(): check if the argument expands simply to Order(x^foo) and
if so expand somewhat further in order not to produce rubbish like
log(Order(x)^(-1)... and such.
Richard Kreckel [Tue, 14 Aug 2001 18:52:29 +0000 (18:52 +0000)]
- Remove the -ansi compiler switch in the example since it doesn't
play well with lex.
- Added a passing reference to autogen.sh for brave people who are running
from CVS.
Richard Kreckel [Tue, 14 Aug 2001 18:18:10 +0000 (18:18 +0000)]
- Updated to the optimized version. This allows us to
a) add more tests for consistency
b) actually believe the result of the timings because they were
irreproducible before (due to different branches taken by different
representations, which happens because eariler tests account for
low timings by iterating an unknown number of times thus producing
different hashvalues for symbols in later calculations.)
Richard Kreckel [Mon, 30 Jul 2001 19:09:29 +0000 (19:09 +0000)]
- moved is_of_type and friend macros into utils.h so they can be phased
out in one of the next releases.
- rewrote the foo_evalf() functions without TYPECHECK macros. (Since they
were not flexible enough and some functions need more flexibility than
can be provided by such macros. They are evil anyways.)
- marked the TYPECHECK macros as evil^H^H^H^Hdeprecated.
- implemented a more flexible scheme for some foo_evalf() functions, notably
zeta(3.0) eval's to a float now while zeta(3) doesn't eval, just as is
usual for all the trigonometric functions.
- this day is very hot.
Richard Kreckel [Fri, 27 Jul 2001 03:58:21 +0000 (03:58 +0000)]
- power::eval(): for the case (b_n/b_d)^(e_n/e_d) we now check separately
if we can compute numerator and denominator. This allows us to eval
(3/8)^(1/3) to 1/2*3^(1/3) instead of holding it. For square roots this
is still less clever than what MapleV does, but then again that system
has the funny goof not to touch 8^(1/3) where we immediately eval() to
plain 2; fun, fun, fun...
Oh, and a little memory hole has been squished along the way, too.
Christian Bauer [Thu, 26 Jul 2001 23:28:08 +0000 (23:28 +0000)]
- epsilon*epsilon contractions work
- dirac_slash(a, D) now constructs a special kind of clifford object (printed
as "a\") instead of creating a "a.symbol42*gamma~symbol42" product. This
helps avoiding problems when doing something like
ex prop = (dirac_slash(p, D) - m * dirac_ONE());
ex I = prop * dirac_slash(l, D) * prop;
where the same dummy index would be used for both p-slash in I. Now it's
perfectly safe to do this. Dummy indices are only created when taking
traces or contracting indices. A nice side-effect of this is that "a\*a\"
immediately gets simplified to a^2.
- The "contraction of symmetric and antisymmetric objects is zero" rule
in simplify_indexed() has been generalized. Now expressions like
"epsilon.i.j.k*A.j*A.k" also get simplified to zero (what GiNaC does is
to assert dummy index exchange symmetry).
Richard Kreckel [Wed, 18 Jul 2001 22:55:14 +0000 (22:55 +0000)]
- removed this file. it has become obsolete as of libtool-1.4. removing
the file may cause old versions of automake to fail, however. please
apply the patch at the end of libtool-1.4's README to automake if you
encounter this problem (i.e. simply remove 'ltconfig' from the
@libtoolize_files list).
Richard Kreckel [Wed, 27 Jun 2001 23:07:30 +0000 (23:07 +0000)]
- eta(x,y) was broken all along since ages: eta(I,I) for instance ought
to return 0 but... that formula that reduces eta(x,y) to theta functions
is basically to naive.
Christian Bauer [Wed, 27 Jun 2001 00:32:01 +0000 (00:32 +0000)]
- replaced the Derivative() function by a more resonable fderivative class;
to see it in action, try "series(abs(x),x==0,3)" and "series(abs(x),x==y,3)"
in ginsh with previous GiNaC releases and with this one
- add::eval() throws an exception when the first term is non-commutative and
the overall_coeff is non-zero
- small fixes to print_tree output of indexed objects
- ncmul::expand() now actually does expand something like "(dirac_gamma(mu)+1)
*dirac_gamma(nu)" correctly (but the change to add::eval() should make this
a "can't happen" case)
- moved ToString() to tostring.h (fewer header dependencies)
- ALL YOUR "BASES CLASSES" ARE BELONG TO US
Richard Kreckel [Tue, 26 Jun 2001 21:19:34 +0000 (21:19 +0000)]
* Ctors of class numeric are not explicit any more. All built-in callers for
pseudofunctions are now templated and default to ex arguments which relaxes
the need for explicit ctors.
Christian Bauer [Sat, 23 Jun 2001 16:52:04 +0000 (16:52 +0000)]
- added find() (like has(), but returns list of all occurrences)
- added lst::sort() and lst::unique()
- status_flags::expanded is only taken into account when no expand options
are specified. This makes it possible to re-expand with other options.
- added expand_options::expand_function_args
- collect(foo, {}) doesn't crash any more
- introduced match_same_type() method which is slightly similar to
is_equal_same_type() but doesn't check subexpressions. Fixed a number of
match() bugs with this (e.g. a==b matched a!=b, and matrices with different
dimensions but the same number of elements could match). Only container
classes with additional member variables that have to be equal for a match
need to implement match_same_type().
Richard Kreckel [Tue, 19 Jun 2001 21:33:04 +0000 (21:33 +0000)]
* Fix a bitch of a bug where 1<I (and all other relationals) returned true.
This did not happen for the binary relational operators between numerics.
Now the behaviour is more consistent (throwing exceptions when the difference
becomes complex).
* Some regression tests were actually wrong in the light of this bug. :-(
Christian Bauer [Tue, 19 Jun 2001 19:50:02 +0000 (19:50 +0000)]
- The default implementations of evalf(), diff(), normal() and expand() use
map() where useful. This has the nice effect of having a more reasonable
default behaviour for container functions (most of the evalfchildren() etc.
stuff is gone).
- diff() works with non-commutative products (product rule) and no longer
bails on indexed objects.
- added decomp_rational()
- added sqrfree_parfrac() which doesn't yet work in the general case and
is unsupported
Richard Kreckel [Sat, 16 Jun 2001 18:38:00 +0000 (18:38 +0000)]
* Supplement some (now deprecated) macros by inlined template functions:
- ex_to_foobar(baz) -> ex_to<foobar>(baz).
* De-document is_of_type(obj, type) and document is_a<type>(obj).
* De-document ex_to_type(obj) and document ex_to<type>(obj) eliminating the
need to declare one's one inline converters in the mystring example.
Christian Bauer [Mon, 11 Jun 2001 23:48:43 +0000 (23:48 +0000)]
- Instead of just totally symmetric or antisymmetric, complex symmetries
can now be defined for indexed objects. Symmetries are described by a
tree of "symmetry" objects that is constructed with the sy_none(),
sy_symm(), sy_anti() and sy_cycl() functions. The symmetry of a function
with respect to its arguments can also be defined (this is currently
only used for the Beta function).
- color_trace() and dirac_trace() can be applied to a more general class
of expressions, e.g. using it on a relation will take the trace on both
sides etc.
- Generalized map() to take a function object instead of a function pointer.
This allows passing an arbitrary number of additional state to the
function being called.
- The unarchiving functinos find_bool(), find_unsigned() and find_string()
can take an additional "index" argument.