Am 17.03.2013 20:13, schrieb eli m:
> On Sunday, March 17, 2013 12:12:54 PM UTC-7, SG wrote:
>> Am 17.03.2013 19:20, schrieb eli m:
>>> Whenever i try to multiply big numbers in c++ (for example:
>>> 384723987432324 * 23042348372947233240) it always says zero for the
>>> answer. Why does it do this?
>>
>> What does your C++ book say on
>> - the type(s) of integer literals?
>> - the values different integer types can represent?
>> - on arithmetic overflows?
>>
>> SG
>
> I don't have a book on c++.
Then you should do something about this, seriously!
See
http://stackoverflow.com/questions/388242/
for a nice selection.
And since you posted some of the code
here are two more homework questions for you:
What does the C++ book you will be ordering say
- about the type "unsigned float"?
- about conversions between different arithmetic
types with respect to whether or not the
values will be preserved and if not, whether
or not there is some specific expected behaviour
of the program?
SG