MathGroup Archive 2006

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

Search the Archive

Re: repeated usage of packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67558] Re: repeated usage of packages
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Fri, 30 Jun 2006 04:15:32 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 6/29/06 at 12:10 AM, hespeler at gmx.de (hespeler) wrote:

>calling a function which is defined in a already loaded package I
>get perfect results. Calling the fuction a second time with
>different values for the arguments I get a result which does not
>coincide with the result obtained from the function, if the latter
>arguments are used as the initial ones.

>The same happens even after replicating the original package with
>another name and calling the two different packages and calculating
>the therein defined two different packages which coincide with
>respect to their content.

>Does anyone have any hint?

Perhaps the issue is the phase of the moon on Mondays? 

Seriously, how do you expect anyone to offer constructive suggestions when you've provided no details of the function or package. It would be trivial for me to create a function in a package that behaves as you describe.

For example, I could do something like the following:

call SeedRandom[0] to set Mathematica's random number generator to a known state before defining the function, then defined a function such as

func[x_,y_]:= x+y+Random[]

Or if I wanted to be a bit more unpredictable I might have a counter to count the number of times the function is called and have calls made to Random[] whenever the counter reached certain values.

Note, none of the above is likely useful or relevant to your specific problem. It merely points out the difficulty of providing constructive, relevant suggestions when you don't provide details of the problem you are having.
--
To reply via email subtract one hundred and four


  • Prev by Date: RE: Packages--Problem in evaluating functions from my own package!!!
  • Next by Date: Options to FunctionInterpolation
  • Previous by thread: Re: repeated usage of packages
  • Next by thread: NDolve + ParametricPlot