MathGroup Archive 1995

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

Search the Archive

Re: How to set Sign of expression?

  • To: mathgroup at
  • Subject: [mg1650] Re: How to set Sign of expression?
  • From: rubin at (Paul A. Rubin)
  • Date: Sat, 8 Jul 1995 05:15:34 -0400
  • Organization: Michigan State University

In article <3t2io7$mie at>,
   keeton at (Charles Keeton) wrote:
->Hi.  I want to set the Sign of an expression.  For example, suppose
->I know a is restricted to the range 0 < a < 1; then I know 1-a > 0.
->How do I tell Mathematica this?  I have tried
->  Sign[1-a]^=1
->  a /: Sign[1-a]=1
->but Mathematica frowns on both.  Any ideas?
->Thanks in advance,

Been there; done that; doesn't work.  The two problems seem to be that (a) 
you can't count on Mma checking whether a<1 when you want it to and (b) you 
can't predict how it will do the check if indeed it does.  For instance, 
even with your up-value (the right approach IMHO), I don't think Less[a,2] 
would return True.  (BTW, you might try a /: Less[a,1] = True.)


* Paul A. Rubin                                  Phone: (517) 432-3509   *
* Department of Management                       Fax:   (517) 432-1111   *
* Eli Broad Graduate School of Management        Net:   RUBIN at MSU.EDU    *
* Michigan State University                                              *
* East Lansing, MI  48824-1122  (USA)                                    *
Mathematicians are like Frenchmen:  whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different.                                    J. W. v. GOETHE

  • Prev by Date: Re:Fitting data on a vertical line
  • Next by Date: Mathematica --> C convertor, anyone?
  • Previous by thread: How to set Sign of expression?
  • Next by thread: Q: Random[]