MathGroup Archive 2003

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

Search the Archive

Re: Compile

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45314] Re: Compile
  • From: Maxim <dontsendhere@.>
  • Date: Tue, 30 Dec 2003 04:14:20 -0500 (EST)
  • References: <bsmaif$daj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Bill Rowe wrote:

> On 12/27/03 at 5:00 AM, dontsendhere@. (Maxim) wrote:
>
> > My claim was: the first argument of Plot is evaluated in a
> > non-standard way, that is, wrapping it in Evaluate would change the
> > outcome. Do you not see how the example Plot[Random[],{x,0,1}]
> > demonstrates this point?
>
> I understand why Plot[Random[],{x,0,1}] and Plot[Evaluate@Random[],{x,0,1}] result in clearly different plots. And these two do illustrate the arguements to plot are evaluated differently than arguments to other functions.
>
> > The argument that the effect of Compiled
> > might change for some more complicated expressions is just
> > speculation. I can make up a more complicated construct, like
>
> The only real difference I see between a simple expression and a complicated expression is when the simple expression consists of a fundamental function (one not written in Mathematica code) there really isn't anything for Compiled to do. Consequently, I was pointing out I would expect Plot[Random[],{x,0,1},Compiled->True] to result in the same plot as Plot[Random[],{x,0,1},Compiled->False], i.e., Compiled should not make a difference. So, I do not understand what relationship these examples have to do with the point you are making. In fact, I don't really see a problem.
> --
> To reply via email subtract one hundred and four

I don't see any problem with Plot[Random[],{x,0,1},Compiled->True] either, it was just an illustration (if you don't like Random[], you can insert A Very
Complicated Expression instead). But you have to read the thread from the beginning, the problem is with

Module[{y := If[NumericQ[x], x, 1]},
  Plot[x y, {x, 0, 1}, Compiled -> True]
]

Maxim Rytin
m.r at prontomail.com



  • Prev by Date: Data Plotting With Less Typing
  • Next by Date: Re: On MS-Windows -- Calling MS-DOS Applications from Mathematica
  • Previous by thread: Re: Re: Compile
  • Next by thread: Re: Compile