RE: keeping fractions from being simplified?

• To: mathgroup at smc.vnet.net
• Subject: [mg22356] RE: keeping fractions from being simplified?
• From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
• Date: Fri, 25 Feb 2000 21:14:02 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Gerhard wrote:
I am using mathematica 3.0. I would like to keep fractions _not_ simplified,
e.g. 12/9 should stay 12/9 and not become 4/3. Can I set this behaviour
globally, that is without stating Hold[12/9]?
--------------------
The only simple solution is to use HoldForm, but if you want to use the
result later on you will need to use ReleaseHold as I do below. HoldForm is
slightly better than Hold because it isn't displayed in the output.

In[1]:=
x=HoldForm[12/9]
Out[1]=
12/9

In[2]:=
2/3+ReleaseHold[x]
Out[2]=
2

In many other cases we would like to prevent further evacuation, but treat
the result as if it didn't have some type of "Hold" when it's used in future
work. Some examples are:

Out[4]:=
Sqrt[6]x/2

Out[5]:=
2/(1+(w x y z)^2)

Out[6]:=
(2^64-n)/5

Out[7]:=
79 a {6, 8, 5, 12}

You can't get the above as output expressions without using some type of
Hold!
I give a few more examples at:
http://www.verbeia.com/mathematica/wish_list.html

--------------------
Regards,
Ted Ersek

Mathematica tips, tricks have moved to
http://www.verbeia.com/mathematica/tips/Tricks.html

```

• Prev by Date: easiest way to display a plot from C to kernel using Mathlink?
• Next by Date: Re: a Graphic in a Graphic
• Previous by thread: keeping fractions from being simplified?
• Next by thread: Re: keeping fractions from being simplified?