Questions tagged [uint64]

The uint64 is a datatype that represents an unsigned integer and is coded on 64 bits in memory.

uint64 is a datatype that represents an and is coded on 64 bits in memory. Unlike its counterpart which is , uint64 can only be used to store positive integers, of values between 0 and 264 - 1.

192 questions
1
vote
1 answer

How Convert Byte Array To UInt64 In Objective-C

This is so far what I've done to convert the 8 bytes I received to UInt64: + (UInt64)convertByteArrayToUInt64:(unsigned char *)bytes ofLength:(NSInteger)length { UInt64 data = 0; for (int i = 0; i < length; i++) { data = data |…
JLT
  • 3,052
  • 9
  • 39
  • 86
1
vote
1 answer

Replacing BigInteger with UInt64 for Prime factorization algorithms where N < 2^63

I have a good solution for Prime Factorization implemented in VB.Net with BigInteger using both Pollard's Rho and Brent's algorithms (see: https://stackoverflow.com/a/31978350/44080) For N< 2^63 I belive UInt64 should be adequately large, and…
Charles Okwuagwu
  • 10,538
  • 16
  • 87
  • 157
1
vote
2 answers

How to convert std::chrono::time_point to uint64_t?

I am trying to see whether my data is 120 second (or 2 minutes) old or not by looking at the timestamp of the data so I have below code as I am using chrono package in C++: uint64_t now =…
user1950349
  • 4,738
  • 19
  • 67
  • 119
1
vote
2 answers

WPF Convert hex to UInt

I want to convert Hexadecimal into a UInt. The problem is the following: when I try this: uint value = Convert.ToUInt32((hex), 16); and the hex is for example 12 bytes size, all works fine, but when I try to convert a hex with 32 bytes size I have…
IrApp
  • 1,823
  • 5
  • 24
  • 42
1
vote
1 answer

ctypes uint64 conversion error

I got the following problem : I load via c types the nicaiu.dll to control a NI-USB6218 Data Acquisition Pad and i have to call several function to initialise it (DAQmxCreateTask(), DAQmxCreateAIVoltageChan() and DAQmxCfgSampClkTiming() ). The…
Gora
  • 61
  • 12
1
vote
2 answers

Large (but representable) integers get parsed as doubles by NSNumberFormatter

I've been using the following method to parse NSString's into NSNumber's: // (a category method on NSString) -(NSNumber*) tryParseAsNumber { NSNumberFormatter* formatter = [NSNumberFormatter new]; [formatter…
Craig Gidney
  • 17,763
  • 5
  • 68
  • 136
1
vote
1 answer

Cython can not cast negative value to unsigned long

I'm trying to cast a big negative value inside a Cython class to an uint64_t type variable. But i keep getting this error: OverflowError: can't convert negative value to unsigned long cdef uint64_t temp2 = (temp -…
Alan Höng
  • 113
  • 2
  • 10
1
vote
2 answers

How exactly does C++ casting between numeric types work?

In my code, I do something like the following: double a = 3.0; uint64_t b = static_cast(a); double c = static_cast(b); Interestingly, this works as I would expect (a == c), as long as a is positive, but if a is negative, c ends up…
djpetti
  • 191
  • 2
  • 12
1
vote
1 answer

sse sum of unsigned long long array

based on SSE reduction of float vector I tried to sum the array of unsigned long long but unfortunatelly without any success. uint64_t vsum_uint64 (uint64_t *a, int n) { uint64_t sum; // lets say sum fits __m128 vsum = _mm_set1_ps(0); …
petrbel
  • 2,428
  • 5
  • 29
  • 49
1
vote
1 answer

How to multiply integers larger than uint64?

#include #include int main(void) { cout << std::numeric_limits::max(); return 0; } The code above outputs (on my machine) 18446744073709551615, but I'm trying to multiply numbers that have at least 25…
vaultah
  • 44,105
  • 12
  • 114
  • 143
1
vote
3 answers

C - Rotate a 64 bit unsigned integer

today, I have been trying to write a function, which should rotate a given 64 bit integer n bits to the right, but also to the left, if the n is negative. Of course, bits out of the integer shall be rotated in on the other side. I have kept the…
user2965601
1
vote
4 answers

Converting input variable to Uint64

I'm having issues scripting the creation of a new VHD (A tool for the creation of network optimised packages). The script below basically pulls the total size of the input directory and passes that as a variable to the $intval function, which…
mitchimus
  • 830
  • 1
  • 10
  • 24
1
vote
4 answers

c++ string (int) + string (int)

I have 2 strings, both contain only numbers. Those numbers are bigger than max of uint64_t. How can I still add these 2 numbers and then convert the result to string?
John Smith
  • 2,291
  • 4
  • 22
  • 33
1
vote
4 answers

Best way to store an unsigned 64 bit integer in Oracle Database 11g using OCCI

I'm using version 11.2 and there is no direct support for uint64 in table fields. What do you suggest to do performacewise? It must be the primary key. Thanks
Marco Fiocco
  • 352
  • 2
  • 15
1
vote
3 answers

ffmpeg H264 avi file get frame timestamp?? UINT64_C errors

avi file with h264 codec. I need to open it and extract the timestamp of every frame. I tried to do it in opencv but it returns wrong results. I have modified the code of the example filtering_video.c that exists in the fffmpeg/doc/examples folder…
jmlaios
  • 119
  • 3
  • 11