Transforming (x-y)^2 into (x-y)*(x-y) ?
- To: mathgroup at smc.vnet.net
- Subject: [mg22578] Transforming (x-y)^2 into (x-y)*(x-y) ?
- From: Axel Kowald <axel at itb.biologie.hu-berlin.de>
- Date: Sat, 11 Mar 2000 17:52:49 -0500 (EST)
- Organization: Technische Universitaet Berlin, Deutschland
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
I use Mathematica 4 to generate some equations which I export as C code (CForm).
I would like to force Mathematica to export expressions like (x-y)^2 as
(x-y)*(x-y), but I don't know how to achieve this in Mathematica. I tried
several combinations of Hold (and its variants) and t_^2 -> t*t, but so
far I had no luck.
Any hints are welcomed,
Axel Kowald
--
-----------------------------------------------------------------
Dr. A. Kowald
Innovationskolleg Theoretische Biologie
Humboldt University Berlin
Invalidenstr. 43
10115 Berlin
Germany
Email: a.kowald at itb.biologie.hu-berlin.de
Phone: +49 30 2093 9105
Fax: +49 30 2093 8801
-----------------------------------------------------------------