The documentation says that the size of a double is 8 bytes (http://www.arduino.cc/en/Reference/Double) but I find that in a C program, sizeof(double) returns 4.
Single precision floating point is an IEEE 754 standard for encoding floating point numbers that uses 4 bytes. (reference)
Double precision floating point is an IEEE 754 standard for encoding floating point numbers that uses 8 bytes. (reference)
char is 8 bits, int is 16 bits, long is 32 bits, long long is 64 bits, float and double are 32 bits (this is the only supported floating point format)
The wiki article quoted on single-precision vs double-precision is pretty questionable. There are/were many floating point formats in use that are not IEEE754 based that still had what they called single and double precision.
I think it is possible to have single and double floating point numbers represented using the same 32-bits. Just for double, dedicate more bits to represent the exponent and that is it.
the PDP-10 FP format had a max/min exponent of +/-38
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16