Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C

Name: Anonymous 2009-12-25 13:43

how does one work with larger numbers than 18446744073709551615 in C

Name: Anonymous 2009-12-25 13:50

the only methods i'm seeing involve either representing it as an array, and pretty much recreating a new datatype, or using a library

Name: Ctard 2009-12-25 13:54

Use the gmp library for arithmetic on unbounded integers (aka big ints)

Name: Anonymous 2009-12-25 14:55

Read SICP

Name: Anonymous 2009-12-25 15:08

>>2
What more were you expecting, exactly?

Name: Anonymous 2009-12-25 18:17

>>5
Magic.

Name: Anonymous 2009-12-26 2:42

what would be the apple equivalent to GMP?

Name: Anonymous 2009-12-26 3:22

>>7
NSBigInteger or whatever. If Apple weren't nazis, one could just use GMP, but this is prohibited by the license agreement of all Apple's product.

Name: Anonymous 2009-12-26 4:18

Why do compilers support 64 bit integers (even in 32 bit platforms without 64 bit native arithmetic), and then why do they stop here?

Name: Anonymous 2009-12-26 5:53


misaka@kuroko:~$ cat /dev/tty > test.c
#include <stdio.h>

int main() {
 int derp = 18446744073709551615;
 printf("%d\n",derp+1);
 printf("sizeof(int) = %d\n",sizeof(int));
 return 0;
}^D
misaka@kuroko:~$ cc test.c
misaka@kuroko:~$ ./a.out
18446744073709551616
sizeof(int) = 16
misaka@kuroko:~$ uname -a
Anonix kuroko r61ex 2009-12-18 04:47:31 SMP IA64-SSE
misaka@kuroko:~$

Name: Anonymous 2009-12-26 9:28

>>10
wat?  128-bit int???

Name: Anonymous 2009-12-26 9:30

128-bit MY ANUS

Name: Anonymous 2009-12-26 9:44

>>11
Back to /b/, please.

>>10
ANONIX QUALITY

Name: Anonymous 2009-12-26 21:55

>>11
SSE kernel

Name: Anonymous 2010-12-23 9:42


Don't change these.
Name: Email:
Entire Thread Thread List