Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: How to prevent from simplification?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52461] Re: [mg52441] How to prevent from simplification?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 28 Nov 2004 01:06:42 -0500 (EST)
  • References: <200411270640.BAA17163@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com


On 27 Nov 2004, at 07:40, Christian Auner wrote:

> 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
> like
>
> number + number
>
> That is the evalution stops right before the addition.
>
> I already tried HoldForm but it didn't work.
>
>
>
It is enough to apply HoldForm just to the first summand:

In[2]:=
HoldForm[a] + b/c /. {a -> 1, b -> 6, c -> 3}

Out[2]=
1+2

Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/~andrzej/
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: Re: On constants and D's behaviour
  • Next by Date: Re: How to prevent from simplification?
  • Previous by thread: How to prevent from simplification?
  • Next by thread: Re: How to prevent from simplification?