English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

DOUBLE is 8 bytes , right , and it is positive , also right ?
It has an e , and whats it ? , and a plus mark ,
a 2*1000000 is displayed as 2e+006 ,
a 20 is displayed as 20 ,

could you explain ?
thank you !

2007-06-22 00:41:53 · 4 answers · asked by andrew martin 1 in Computers & Internet Programming & Design

4 answers

The "e" in that case just denotes that it is 2 x 10^6, or 2e6. This is common mathematical notation for large numbers. The plus just indicates that you are raising ten to a positive 6, not a negative. If you raised it to a negative number you would be getting a fraction.

Hope that helps.

2007-06-22 00:53:38 · answer #1 · answered by Anonymous · 0 0

Double is at least 64-bits on modern computer, not specified to be 64 bits within C++, e stands exponent, as said common math notation; in the context of floating point theory the word "mantizza" is used instead.

2e+6 is shorter to display than 2000000.

2007-06-22 08:13:56 · answer #2 · answered by Andy T 7 · 0 0

Double does not necessarily mean that it has to be positive. To add another bit to the total number it can store and almost double the amount of positive values you can store use UNSIGNED DOUBLE.

DOUBLE is just that, double the bytes used to store and INT. On a standard 32-bit machine that means that double stores 8-BYTES or 1.7E +/- 308 (15 digits).

2007-06-22 08:52:09 · answer #3 · answered by Henrik N 2 · 0 0

http://en.wikipedia.org/wiki/Scientific_notation

2007-06-22 08:32:54 · answer #4 · answered by csanon 6 · 0 0

fedest.com, questions and answers