Variable precision

  • Thread starter Thread starter John Dann
  • Start date Start date
J

John Dann

Just a curiosity really, but I am curious as to the explanation:

I'm trying to read an external DLL written in C++ I think using
DLLImport. The DLL version number is available from a DLL function
which returns a float variable. The value should be 2.3 but a .Net
(double) variable is returning 2.9999xxxxxx. where xxxx is a sequence
of other digits.

Obviously in retrieving the value into the .Net environment something
is ever so slightly perturbing the original value. Anyone know what
this might be?

JGD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top