Mail Archives: djgpp/2004/02/18/06:02:57
Eli Zaretskii <eliz AT elta DOT co DOT il> wrote:
> > From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: 17 Feb 2004 12:46:07 GMT
> >
> > The problem at hand is rather probably one of numerical accuracy of
> > your code, i.e. rounding errors. It may seem surprising that these
> > should depend on the operating system, while the CPU is kept the same,
> > but that can, indeed, happen.
> Could you suggest a mechanism that could explain how numerical
> inaccuracies could depend on the OS, assuming we are talking only
> about systems supported by DJGPP? I don't think I see how this could
> happen, unless someone shows to me that the x87 is set up differently
> by different versions of Windows.
My memory may be failing me here, but I do seem to recall exactly that
having been the case, at least once in the past. Windows 9x seemed to
re-set the FPU control word of a running DJGPP program in mid-stream,
or at least allow that to happen, if some other process tramps over
it. I.e. it fails to guarantee keeping an FPU control word change
alive over the duration of a DOS process.
I vaguely remember McAfee or some other on-access virus scanner demon
having had that effect, and us complaining loudly about that
silliness, back at the time. In the effect, it made it essentially
impossible to run with any non-default FPU configuration (like, say,
to force the FPU to restrict precision of its registers to double, to
reduce surprises from "excess precision" in some programs).
But, to repeat, this is all off this memory of mine, which is
definitely known to be lossy.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -