What is Double precision?

I am solving a problem that deals wit arrays. It states "The array should be capable of storing five double-precision numbers."
Being new to arrays I have no Idea what does this double precision mean.
Need Help!
Last edited on
Hi,

In short: make the array type double

There are several levels of precision for floating point numbers: single, double and extended. Single means 6 or 7 significant figures and can be represented with a float type. Double precision has 15 or 16 sf, and can be represented with double. Extended is anything with more than that. One could use long double (18 or 19 sf), or another type from a library which may have a user defined amount of precision.

Note that double is the default, the precision of float is easily exceeded, and should be avoided for that reason. Sometimes use of float maybe required for some library functions: typically a graphics library.

Good Luck !!
Thanks man !
Topic archived. No new replies allowed.