64 bit integers on 32 bit systems
1
Name:
Anonymous
2007-11-04 14:23
I doubt it's safe to assume that long long can hold it.
So, if i want to pretend i'm an expert programmer for a while, how do i solve this in a portable way?
Basically i'm after the method to use here because i'm a eurofag so english programming terms are a problem, i don't know what to search google for.
I saw something on wikipedia that well written programs can compile on both 32 and 64 bit systems but how do you accomplish that?
2
Name:
Anonymous
2007-11-04 14:42
int64_t, etc.
But such specific types are more for binary file formats and networking, where programs on different architectures need to be compatible. If you just need some memory to keep a large integer, use long long.
3
Name:
Anonymous
2007-11-04 15:01
Yeah it's just for a large integer, i guess relying on each systems implementation of long long does make sense in a way.
I don't have any lights in my apartment but so far i haven't found anything in k&r about long long. What does the standard say that each implementation of this should be?
4
Name:
Anonymous
2007-11-04 17:06
5
Name:
Anonymous
2007-11-04 17:16
>>1
long long is c99, and >= 64 bits.
bye.
6
Name:
Anonymous
2007-11-05 6:11
>>1
By 'eurofag' do you mean German? Because Germans and French are the only people that come to mind, who can't be bothered to learn English.
7
Name:
Anonymous
2007-11-05 13:11
>>6
Both the German and the French are fluent in English... you must be thinking of the lowest of the low -- the Spainards.
JAJAJAJAJAJAJAJAJAJAJAJAJAJAJAJAJAJAJAJAJA
8
Name:
Anonymous
2007-11-05 13:45
Germans are annoying. `Bann'? `Logg'? Ugh!
9
Name:
Anonymous
2007-11-05 13:50
10
Name:
Anonymous
2007-11-05 14:08
>>9
That's funny. And to think someone yelled `skinhead' at me the other day.
11
Name:
Anonymous
2007-11-05 14:13
>>10
Jew with extreme hair loss?
12
Name:
Anonymous
2007-11-05 14:18
13
Name:
Anonymous
2007-11-05 14:22
Interesting fact: If you are a Jew and you have no hair, you are most likely black. Check your skin colour,
>>8 .
14
Name:
Anonymous
2007-11-06 23:20
i am a person with no skin colour
15
Name:
Anonymous
2007-11-06 23:20
i am a person with no skin
16
Name:
Anonymous
2007-11-07 0:18
>>15
I'm a skin with no person... let's cons ♥.
17
Name:
Anonymous
2007-11-07 0:32
long long on 32-bit systems will still be 64 bits and safe.
Floating point numbers are usually 64 bits, even on 32 bit systems, and compute just fine there.
18
Name:
Anonymous
2007-11-07 1:39
>>17
Floats are 32-bit. doubles and long doubles are 64-bit. Easy misconception.
19
Name:
Anonymous
2007-11-07 2:08
>>18
long doubles may be 128-bit, as may be long longs.
long long cat = 170141183460469231731687303715884105727;
printf("%lu",cat);
20
Name:
Anonymous
2007-11-07 2:45
>>19
that's what she said ;)
21
Name:
Anonymous
2007-11-07 4:14
{code]long dong[/code]
lol
22
Name:
Anonymous
2007-11-07 7:42
>>7
I know of several Spaniards who write much better English than native Americans. Then again, that's not that great an achievement.
23
Name:
Anonymous
2007-11-07 15:18
>>22
fo shizzle mah nizzle
24
Name:
Anonymous
2007-11-07 17:47
>>22
u meen dis no rite englsih spleling
no wai
25
Name:
Anonymous
2007-11-10 11:39
>>22
well that shouldn't be too hard since native americans didn't even speak english a few hundred years ago
26
Name:
Anonymous
2007-11-13 8:33
I are German and do feel offended by people suggesting me not know Englisch very well!!!111
27
Name:
Anonymous
2010-11-15 9:25