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 >