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
With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Warning: this topic has not been posted in for at least 120 days.Unless you're sure you want to reply, please consider starting a new topic.