Re: Bugs in Abs and Sign !?
- To: mathgroup at smc.vnet.net
- Subject: [mg25711] Re: Bugs in Abs and Sign !?
- From: "Bill Bertram" <wkb at ansto.gov.au>
- Date: Thu, 19 Oct 2000 04:35:35 -0400 (EDT)
- Organization: Australian Nuclear Science and Technology Organisation
- References: <8sjkr7$g3p@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jack Goldberg <jackgold at umich.edu> wrote in message news:8sjkr7$g3p at smc.vnet.net... > Hi group. > > Try, > > Abs[x^2] /. Abs[u_] -> fnt[u] > > and > > Sign[x^2] /. Sign[u_] -> fnt[u] > > In each case I get fnt[x]^2. Shouldn't I get fnt[x^2]? After all, > g[x^2] /. g[u_] -> fnt[u] returns fnt[x^2] which is what I have been led > to expect from Mathematica. I am using ver 4.01 on a PowerMac. > Hi Jack, It does certainly looks like a bug, but in this case Mathematica seems to have been smart enough to realise that ( at least for integer n), Sign[x^n] == Sign[x]^n, and ditto for Abs. So fnt[x]^2 and fnt[x^2] are numerically identical. Cheers, Bill