MathGroup Archive 2008

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

Search the Archive

Re: Setting "attributes" for variables?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94382] Re: Setting "attributes" for variables?
  • From: dh <dh at metrohm.com>
  • Date: Thu, 11 Dec 2008 03:48:20 -0500 (EST)
  • References: <gho34v$2a$1@smc.vnet.net>


Hi Julian,

I do not know a general way of dealing with this problem. Defining a new 

type does not look promising, because positive numbers constitute not 

even a group.

But you may still mend the most nagging cases by making giving a rule.

E.g. if Sqrt[Seconds^2] bugs you, simply define

Unprotect[Sqrt];

Sqrt[Seconds^2]=Seconds

hope this helps, Daniel



Julian wrote:

> Hi all,

> 

> I always wondered if it's possible to set, for example, that some

> variable X is real and greater than 0 throughout the entire session

> that I'm working.  I know of $Assumptions, but it becomes annoying to

> have to use Simplify or Refine after every calculation that doesn't

> have an assumptions option.  One notable instance is in the units

> package.  I constantly get results like Sqrt[Second^2] when clearly

> that result is simply Second.  Is there any way to fix this?  I'm

> using version 6, by the way.

> 

> Julian

> 




  • Prev by Date: Re: User interface version 7: Alt Gr issue
  • Next by Date: Re: Ruler
  • Previous by thread: Re: Re: Setting "attributes" for variables?
  • Next by thread: NonlinearFit of an "implicit" function