D
David W
Hello,
float nanometers(long pm)
{
return pm / 1000.0f;
}
void f()
{
if(nanometers(309311L) == nanometers(309311L))
{
// do something
}
}
Is there any way to force the VS .NET 2003 C++ compiler to produce a result of true for the 'if'
expression above? I get false even with the /Op switch. The original code from which I created the
example produced true on an earlier compiler (1.52c). The project is large and I don't know how many
similar problems are lurking in it and there's no easy way to look for them.
DW
float nanometers(long pm)
{
return pm / 1000.0f;
}
void f()
{
if(nanometers(309311L) == nanometers(309311L))
{
// do something
}
}
Is there any way to force the VS .NET 2003 C++ compiler to produce a result of true for the 'if'
expression above? I get false even with the /Op switch. The original code from which I created the
example produced true on an earlier compiler (1.52c). The project is large and I don't know how many
similar problems are lurking in it and there's no easy way to look for them.
DW