Is long long standard?
Posted: Mon Oct 06, 2003 3:34 am
During the last online conest there was a problem with input numbers that could be as big as 64 bits. Since long is only 32 bits I thought that I might use long long. I'd just read about it in a message on the board a few days ago. My compiler recognized it but I had problems when I wanted to perform mathematical operations (namely log and pow) on such long long numbers. The results were incorrect and the compiler was producing warning messages.
Example:
[cpp]long long m = (long long)log((double)n)/log(3.0)[/cpp]
Could anyone tell me whether long long is included in the standartd or not? And how can I avoid the problems with the math ops? Do you know some online stuff that could be helpfull on the topic?
Example:
[cpp]long long m = (long long)log((double)n)/log(3.0)[/cpp]
Could anyone tell me whether long long is included in the standartd or not? And how can I avoid the problems with the math ops? Do you know some online stuff that could be helpfull on the topic?