This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
10 x 1036778084 = ??
- From: Nobby-Hirand <nobby at ntools dot net>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 7 Jul 2016 22:07:15 -0700 (MST)
- Subject: 10 x 1036778084 = ??
- Authentication-results: sourceware.org; auth=none
I have just find strange answer, 10 x 1036778084 = 1777846248??
I'm using gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 and gcc (GCC) 4.8.5
20150623 (Red Hat 4.8.5-4).
These are same results, 10 x 1036778084 = 1777846248
C Lang:
printf("%d \n", atoi("10367780849"));
1777846248
Result is 1777846257, and also following source,
int y = 1036778084;
int x = 10;
int z;
z = x * y;
printf("%d x %d = %d\n", x,y,z);
10 x 1036778084 = 1777846248
--
View this message in context: http://gcc.1065356.n5.nabble.com/10-x-1036778084-tp1279231.html
Sent from the gcc - bugs mailing list archive at Nabble.com.