Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

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





  • Prev by Date: Solve...
  • Next by Date: Re: Bugs in Abs and Sign !?
  • Previous by thread: RE: Bugs in Abs and Sign !?
  • Next by thread: Re: Bugs in Abs and Sign !?