Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi
double type has 64 bit width and can hold number as small as 1e-308.
i want a data type even smaller than double.

i read in help that long double has 80 bit width and can store as small as 1e-4000, but in VC, when i declare a variable with this type, it threats as double type.

where is the problem?

thanks
Posted

Floating points bigger than a double are not as standardized as float or double. It is much more compiler and Platform dependant.

http://en.wikipedia.org/wiki/Long_double[^]

If you really need more precision, you can either look for another compiler like the one from Intel or look for a library.
 
Share this answer
 
You might use a library (see, for instance, Arbitrary-precision arithmetic libraries at Wikipedia[^]).
 
Share this answer
 
v2
MSDN[^] says double and long double are same.

but CPP reference says you can define a long double by putting a 'L' at the end read more at Double and Long Double[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900