MathGroup Archive 1997

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

Search the Archive

Re: More on Positive[x]

  • To: mathgroup at
  • Subject: [mg7920] Re: More on Positive[x]
  • From: bruck at (Ronald Bruck)
  • Date: Mon, 21 Jul 1997 03:22:10 -0400
  • Organization: University of Southern California
  • Sender: owner-wri-mathgroup at

In article <5qkea7$97k at>, Raya Firsov-Khanin
<raya at> wrote:

:Thanks to everybody for replying to my question on how to declare a
:variable positive. I just want to add that if you declare 
:Positive[x] ^= True
:Positive[x] gives you True. However, Positive[1/x] or Positive[x*y] (where
:Positive[y] ^=True) remain unevaluated. So, to work with positive variables
:one needs to formulate a few rules, namely 
:Positive[1/x_] := Positive[x];  
:Positive[x_*y_] := Positive[x]&&Positive[y]; 
:Positive[x_/y_] := Positive[x]&&Positive[y];  
:Positive[x_^n_] := Positive[x]; 

One of the pitfalls of modifying a built-in function ;-)

What happens if x and y are both NEGATIVE and you apply your second or
third rules?  What happens if x is negative and n is even, in your third

--Ron Bruck

Now 100% ISDN from this address

  • Prev by Date: Re: Problem with Conditiond Function
  • Next by Date: Table of euclidean distances...
  • Previous by thread: Speeding up calculations by lowering the precision ?
  • Next by thread: Table of euclidean distances...