MathGroup Archive 2005

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

Search the Archive

Hidden affects of setting $MinPrecision/SetPrecision?

  • To: mathgroup at
  • Subject: [mg56428] Hidden affects of setting $MinPrecision/SetPrecision?
  • From: terryisnow at
  • Date: Mon, 25 Apr 2005 01:30:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


I have a Mathematica 3.0 simulation that consists of two
parts. The first part loads an 'environment' file (basically
a Mathematica DumpSave file with all the relevant variables),
runs through 35000 iterations, then makes a determination
about whether there were interesting results. If so it signals
the second part of the simulation to reload the same environment
file and re-run the 35000 iterations but this time saving more
details. At the end of this cycle, regardless of whether the
second part runs, a new environment file is saved and everything
is repeated for the next 35000 iterations.

Lately however I've been finding problems with the results of
part one of my simulation not matching the results of part two.
This coincided with the introduction of $MinPrecision and
SetPrecision[] into my calculations (in fact $MinPrecison is now
also saved in the environment file, because obviously you need
that to recreate a given environment). Basically both parts of
my simulation look for special 'events' that indicate that an
increased precision is necessary. When such events are found,
SetPrecision[] and $MinPrecision are employed to increase and
maintain the precision.

When the two parts match (as they should), the iterations at
which precision is increased are identical. So part one might
run and tell me that precision was increased at 35103 and 35355
iterations. Then part two runs after reloading the environment
file and tells me the same thing. This is however currently not
the case.

I've been running these simulations for a long time and the code
doesn't change that often, but just to be sure that the two parts
are semantically equivalent, I ran each part separately,
rebooting my system and reloading the same environment file each
time. When I do this the results match. So this isn't the problem.

Somehow the first part of my simulation is changing the environment
in some way that is not being reset by the reloading of the
environment file. As a last resort I carefully took every variable
in my program and Clear[]'d and ClearAll[]'d them right before
reloading the environment file for part two (including the resetting
of $MinPrecision). That too did not help.

So I'm at my wits end. If anyone knows why this is happening, I'd
be very appreciative to hear from you.


  • Prev by Date: Re: Re: Re: Re: Re: multiple 3d plots
  • Next by Date: Format[ ] with \[OverBracket] in a package `Private` context
  • Previous by thread: FW: Re: Mathematica 5.0 notebooks icon gone.
  • Next by thread: Format[ ] with \[OverBracket] in a package `Private` context