Complex Algebra
- To: mathgroup at yoda.ncsa.uiuc.edu
- Subject: Complex Algebra
- From: pjanhune at finsun.csc.fi
- Date: Wed, 28 Nov 90 09:29:46 +0200
To ken yip <yip-ken at CS.YALE.EDU>, and others who've discussed about complex algebra: For some months ago, I wrote a package Declare.m that allows you to "declare" symbols to be real, integer, odd, even etc. The package makes Mathematica simplify things nicely, for example if you Declare[n,Integer] and Declare[{x,y},Real], then EvenQ[2n] gives True, Sqrt[-x^2] gives I Abs[x]. Complex algebra is simplified, too: Re[Exp[(x+I y)^2]] gives E^(x^2-y^2)Cos[2x y]. (You has to load the standard package Algebra/ReIm.m before this works.) The package, together with test files, is available on the mathgroup anonymous ftp server (128.174.20.50) in Symbolic/Mathematica/Packages/JANHUNEN. I use the package frequently but not always, since it can sometimes make Mathematica run very slowly. Pekka Janhunen Finnish Meteorological Institute, Geophysics Dept. email: pjanhune at finsun.csc.fi