Re: IEEE 754 floating point standard
- From: Ulrich Eckhardt <eckhardt@xxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 08:48:17 +0200
John wrote:
Hi, I was wondering a couple things:
1) Does VC6 comply with the IEEE 754 floating point standard?
No, but VC6 doesn't do any floating-point operations. Rather, it delegates
them to the hardware you are running on.
2) Does complying with this standard guarantee exactly the same result
of a calculation on different manufactured AMD64 compliant CPUs and
different OSes.
No. It might even depend on the optimisation settings of the compiler.
3) I understand that different optimization settings could possibly
change the result of a calculation, but given the same compiled
executable, could optimization settings change the results on different
OSes?
I'd say the OS is less responsible than the hardware, and relying on exact
same results is not a good idea.
We are trying to track down a strange bug in an algorithm that converts
a NURBS surface to a mesh. The algorithm has worked for years on Win2k
and XP but is not working on Vista.
Sounds like your program does some invalid assumptions like a pointer being
32 bits, a long having the size of a pointer (which is a valid assumption
in C99 and C++, bit broken by win64 using the LLP64 model) or similar
things.
I find unlikely to be a floating point implementation problem but I am
not an expert in systems implementations. I would, more likely suspect
memory management, which has undergone significant changes in Vista, but
I would like to rule out the floating point implementation possibility,
so I would appreciate any input you may have.
I also don't think it's the floating point operations.
I should also mention that, yes we are still using VC6. We are in the
process of converting everything over to VC2005, but have not reached
that point yet.
VS2005 has a much better compiler (two major releases ahead) which also
includes helpers to find common errors like buffer overflows, use of
uninitialised variables and a checked implementation of the C++
standardlibrary. I would make that switch first, possibly you will find the
errors on the way.
Uli
.
- Follow-Ups:
- Re: IEEE 754 floating point standard
- From: Ben Voigt
- Re: IEEE 754 floating point standard
- References:
- IEEE 754 floating point standard
- From: John
- IEEE 754 floating point standard
- Prev by Date: Re: LNK2019: unresolved external symbol "__declspec(dllimport)
- Next by Date: Re: _itoa: The POSIX name for this item is deprecated
- Previous by thread: Re: IEEE 754 floating point standard
- Next by thread: Re: IEEE 754 floating point standard
- Index(es):
Relevant Pages
|
Loading