>       I have to work with large numbers (more the 10^15),

Well if you know that all of your numbers are going to be big you could
scale them by dividing them by 10^15 (or something suitable), then they'll
be a sensible order of magnitude.

Remember that it isn't the absolute magnitude of numbers that yields
rounding errors it's mixing orders of magnitude.

> and for that reason I need to use the long double data type which supports
> 10^19.

I'm curious whether this is giving you any real benefit... In the MSDN it
states:

"Microsoft Visual C++ is consistent with the IEEE numeric standards. There
are three internal varieties of real numbers. Real*4 and real*8 are used in
Visual C++. Real*4 is declared using the word float. Real*8 is declared
using the word double. In Windows 32-bit programming, the long double data
type maps to double. There is, however, assembly language support for
computations using the real*10 data type."

So I'm not sure that your long double is actually doing what you think it
is... I haven't checked this out to be absolutely sure and will yield to
anyone's experience.

>The problem is I that I receive theese values in variant variables, I need
to
>precess them, and then save them back into varinats. I didn't find any way
to
>convert from Variant -> long double -> Variant.
>       Is there any way ?

If the long double really is using the 80-bit IEEE format it won't fit into
a single VARIANT which is only 64-bits wide. I guess you could encode the
value across two VARIANTS but this is ugly, and probably doesn't achieve
what you want.

I know that doesn't help....

Daniel


_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to