Long double didn't work over 1e+308
Quote:
> Thank you..for your help
> My work is on win95.I'm trying to multiply very high value over 1e+308
> so I use long double...but it still have the range same as double.I already
> read help that told me long double in win95 automatically convert to double
> because double in win95 use 64-bits that covered long double range,isn't
> it???
The implementation of long double has nothing to do with Win95, it has
to do
with your compiler. I assume you are using VisualC++ and I'm afraid that
VisualC++ 5.0 does not support long double as a distinct type. You can
verify this by noting that sizeof(double) == sizeof(long double) == 8.
4.2 claimed to partially support long double, and I believe previous
compilers
fully supported it.
Unfortunately, the available 80x86 instructions for long double
operations are
very restrictive compared to those for doubles, thus requiring a totally
separate code generator - so I do sympathize with Microsoft's decision
(as
annoying as it is). On the 680x0 the FPU instructions all supported all
three
sizes, so supporting long double was trivial.
Your options are:
1) Recode your app to not need such large numbers.
2) Use a high precision math class.
3) Use assembly language.
4) Use a different compiler.
--
.Bruce Dawson, Cavedog Entertainment.
Makers of Total Annihilation - http://www.cavedog.com