Questions tagged [unsigned-long-long-int]

unsigned long long int specified in the C99 standard

unsigned long long long int is at least 64-bit in size and was specified in the C99 standard. It is the same as long long but unsigned.

151 questions
111
votes
10 answers

Java equivalent of unsigned long long?

In C++, I enjoyed having access to a 64 bit unsigned integer, via unsigned long long int, or via uint64_t. Now, in Java longs are 64 bits, I know. However, they are signed. Is there an unsigned long (long) available as a Java primitive? How do I use…
eleven81
  • 7,551
  • 10
  • 34
  • 47
36
votes
1 answer

Can the Django ORM store an unsigned 64-bit integer (aka ulong64 or uint64) in a reliably backend-agnostic manner?

All the docs I've seen imply that you might be able to do that, but there isn't anything official w/r/t ulong64/uint64 fields. There are a few off-the-shelf options that look quite promising in this arena: BigIntegerField ... almost, but…
fish2000
  • 3,985
  • 2
  • 37
  • 67
16
votes
4 answers

Using long int in PHP

I am trying this out, but am unable to store large value $var = rand(100000000000000,999999999999999); echo $var; // prints a 9 digit value(largest possible) How to get a desired value ?
Prashant Singh
  • 3,595
  • 12
  • 56
  • 105
16
votes
3 answers

(lldb) Print unsigned long long in hex

I am trying to debug my Objective-C program, and I need to print my unsigned long long variable in hex. I am using the lldb debugger. In order to print short as hex, you can use this: (lldb) type format add --format hex short (lldb) print…
Mazyod
  • 21,361
  • 9
  • 86
  • 147
14
votes
3 answers

Unsigned Long Long from Double in Swift

I used to use the following in Objective-C: double currentTime = CFAbsoluteTimeGetCurrent(); // self.startTime is called before, like // self.startTime = CFAbsoluteTimeGetCurrent(); double elapsedTime = currentTime - self.startTime; //…
GarethPrice
  • 932
  • 2
  • 11
  • 23
12
votes
3 answers

unsigned long long vs unsigned long(portability point of view)

I want to be able to use large positive integers(8 bytes) in my project, even though sizeof(unsigned long) yields 8 in my system, I read that in most systems unsigned long is only 4 bytes and I decided to give unsigned long long a go, since it's…
erin c
  • 1,287
  • 2
  • 20
  • 32
11
votes
4 answers

Printing unsigned long long int Value Type Returns Strange Results

I have a problem while using the printf function to print values of type unsigned long long int I have no idea what's wrong. I'm using Dev-Cpp 4.9.9.2 and Visual Studio 2010 Professional (I know that it's not C compiler, but anyway, wanted to try)…
browning0
  • 871
  • 2
  • 10
  • 21
10
votes
1 answer

Implicit conversion: is the following warning valid?

This question Implicit type conversion rules in C++ operators (and several others) state If either is long long unsigned int the other is promoted to long long unsigned int However if I do the following under MSVC: unsigned int a =
9
votes
1 answer

Why is the std::bitset constructor with an unsigned long long argument not marked as explicit?

The Standard Library class template std::bitset has a constructor (C++11 and onwards, unsigned long argument before C++11) constexpr bitset(unsigned long long) noexcept Contrary to many best-practice guidelines, this single-argument constructor…
8
votes
6 answers

Getting big random numbers in C/C++

Standard rand() function gives numbers not big enough for me: I need unsigned long long ones. How do we get really big random numbers? I tried modifying a simple hash function but it's too big, takes too long to run and never produces numbers which…
ForceBru
  • 36,993
  • 10
  • 54
  • 78
8
votes
2 answers

Is std::streampos guaranteed to be unsigned long long?

Is std::streampos guaranteed to be unsigned long long? If not so, how does std::istream::seekg work correctly on files larger than 4G?
xmllmx
  • 33,981
  • 13
  • 121
  • 269
8
votes
4 answers

Bizarre floating-point behavior with vs. without extra variables, why?

When I run the following code in VC++ 2013 (32-bit, no optimizations): #include #include #include double mulpow10(double const value, int const pow10) { static double const table[] = { 1E+000, 1E+001,…
user541686
  • 189,354
  • 112
  • 476
  • 821
8
votes
1 answer

Why aligning of long long union member is bigger than the containing union/struct? Is this correct?

From this question one could start to believe that alignment of a union is not less than the largest alignment of it's individual members. But I have a problem with the long long type in gcc/g++. The full example can be found here, but here are the…
PiotrNycz
  • 20,687
  • 7
  • 55
  • 102
6
votes
6 answers

How can you easily calculate the square root of an unsigned long long in C?

I was looking at another question (here) where someone was looking for a way to get the square root of a 64 bit integer in x86 assembly. This turns out to be very simple. The solution is to convert to a floating point number, calculate the sqrt and…
Philip Couling
  • 10,963
  • 4
  • 37
  • 63
5
votes
2 answers

Store unsigned long long using Core Data

Variations of this question have been asked here and here, but it appears that the question hasn't received a clear answer. The problem that I face is that the MPMediaLibrary framework keeps a reference to each MPMediaItem (music, video, podcast,…
Bart Jacobs
  • 8,812
  • 7
  • 41
  • 83
1
2 3
10 11