managed float != unmanaged float

  • Thread starter Thread starter Amir Kolsky via .NET 247
  • Start date Start date
A

Amir Kolsky via .NET 247

Hello all, this is my first time here so please be gentle :-)

We have a VC++ program that does many floating point (float, notdouble) and we are seeing that the results of runs under VC6 andCV7 are the same. However, when we compile with the clr flag,the results we are getting are different in the very lowsignificant bits of the mantissa. We guess it has something todo with how the precision the CLR uses to hold floating pointnumbers.

Has anyone seen this before? Please answer here and possibly tomy email: (e-mail address removed)

I will post a digest of replies here...

Thanks, Amir Kolsky
 
They are still both correct. You cannot assume that FP values will be
exactly the same between different environments. Even without involving the
CLR, you will get different results in unmanaged code depending on your
compilation options.

Ronald Laeremans
Visual C++ team

Hello all, this is my first time here so please be gentle :-)

We have a VC++ program that does many floating point (float, not double) and
we are seeing that the results of runs under VC6 and CV7 are the same.
However, when we compile with the clr flag, the results we are getting are
different in the very low significant bits of the mantissa. We guess it has
something to do with how the precision the CLR uses to hold floating point
numbers.

Has anyone seen this before? Please answer here and possibly to my email:
(e-mail address removed)

I will post a digest of replies here...

Thanks, Amir Kolsky
 
Back
Top