MathGroup Archive 2004

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

Search the Archive

Re: How to prevent from simplification?

  • To: mathgroup at
  • Subject: [mg52469] Re: [mg52441] How to prevent from simplification?
  • From: "David Park" <djmp at>
  • Date: Sun, 28 Nov 2004 01:06:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at


There is a package, ExpressionManipulation.m, and an associated tutorial
EvaluationTutorial.nb, at my web site below that may help with your problem.
Ted Ersek helped me with this package.

It has routines for selective manipulation and evaluation of expressions in
held expressions.

For your example we could do...


HoldForm[a + b/c]
% /. {a -> 1, b -> 4, c -> 2}
% // EvaluateAtPattern[_Times]
% // EvaluateAtPattern[_Plus]

giving in succession...

a + b/c
1 + 4/2
1 + 2

Or with a different choice of values...

HoldForm[a + b/c]
% /. {a -> 1, b -> 2, c -> 3}
% // EvaluateAtPattern[_Times, \[Infinity], N]
% // EvaluateAtPattern[_Plus]

a + b/c
1 + 2/3
1 + 0.66667

In the third step an extended form of EvaluateAtPattern was used to convert
2/3 to an approximate number by applying the N function.

David Park
djmp at

From: Christian Auner [mailto:mca at]
To: mathgroup at

How can I substitute values into an expression and prevent it from
beeing evaluated and simplified?

Assume I have an expression like

a + b/c

and I want to substitute values for a,b and such that the result looks

number + number

That is the evalution stops right before the addition.

I already tried HoldForm but it didn't work.

  • Prev by Date: Re: Re: Non-algebraic solution
  • Next by Date: Re: Combining graphics and tabels in one cell
  • Previous by thread: Re: How to prevent from simplification?
  • Next by thread: Re: How to prevent from simplification?