-8

What's the difference between a single precision and double precision floating values?

asked Feb 12, 2020 at 21:14
2
  • 2
    Did you try some search first? Commented Feb 12, 2020 at 21:15
  • err... the precision. More specifically approximately 6 significant decimal digits vs 15 for single and double precision respectively. Commented Feb 12, 2020 at 23:36

2 Answers 2

3

In C, double has at least as much precision as, and usually more than, float, and has at least the exponent range of, and usually more than, float.

The C standard only requires that double be able to represent all the values of float: "The set of values of the type float is a subset of the set of values of the type double..." (C 3028 6.2.5 10).

In typical common implementations today, float is represented with 32 bits in the IEEE-754 binary32 format, and double is represented with 64 bits in the binary64 format.

answered Feb 12, 2020 at 21:20
Sign up to request clarification or add additional context in comments.

Comments

0

Single precision (float) is stored in 4 bytes (32bits). Double precision (double) is stored in 8 bytes (64bits).

answered Feb 12, 2020 at 21:16

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.