|
From: jody <jod...@gm...> - 2008-05-06 12:41:09
|
Thanks for the info! As i don't need 80bit precision, I guess i'll get by with some appropriate floating point tricks such as addin small values and rounding.... Jody On Tue, May 6, 2008 at 1:53 PM, Michael Poole <md...@tr...> wrote: > jody writes: > > > Hi > > I'm using valgrind-3.2.1 on fedora 6. > > > > I have encounter a situation where computations with doubles > > give different result when the application is run normally or under valgrind. > > > > > > > > Here is a very simple application showing the problem, vgt.c: > > Your test program behaves differently based on the implementation of > "double". In particular, the 1950 result depends on the intermediate > results being calculated using 80-bit floats, as is traditional on the > stack of x86 FPUs. If the compiled code uses 64-bit floats, which > will happen on x86-64 (and most other) machines, if you use gcc's > -ffloat-store flag on x86 machines, or if you use Valgrind, it > produces the 1949 result. > > According to http://valgrind.org/help/projects.html, the Vex library > that underlies Valgrind only supports 64-bit floating-point > arithmetic, so there is probably no way to get the 80-bit results > within Valgrind. > > Michael Poole > |