Why is float called single precision floating point and double as double precision floating point?

Recommended Answers

All 3 Replies

why is the sky blue? doubles have more precision than floats, and long doubles may or may not have more precision than doubles (compiler dependent).

It is not Compiler Dependent but the size for double is actually double than the float so the number of digits in the double can be more than the float.

I didn't say floats and doubles were compiler depedent. I said long doubles were. Some compilers support long doubles as twice the size as doubles while other compilers such as vc++ 2010 (and earlier versions) treat them the same as doubles.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.