Hi ROBERT,
On 21 Jan 98, 14:57, you wrote to All
RD> I'm new to C++ and find that there are parts in the program below
RD> which I don't understand. If you have a look at lines nine and
...
RD> cout << 1.e3 << endl; // 1000
RD> cout << 1.e-3 << endl; // 0.001
RD> Does 1.e3 mean one multiplied by a thousand, and
RD> 1.e-3 mean one multiplied by minus a thousand?
This has nearly nothing to do with programming ;-) That 1.e3 notation just
means 1.000 times ten to the third power. The 'e' is math shorthand for
'exponent'.
Just consider a X.XXX eY number as X.XXX000... with the decimal point to be
shifted Y places to the right -- in this way you can understand numbers with
negative exponents too: the decimal is just shifted in the other direction.
Greetings from
_____
/_|__| Auke Reitsma, Delft, The Netherlands.
/ | \ --------------------------------------
--- GEcho 1.00
---------------
* Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20)
|