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
0
votes
2 answers

C# uint64 -- Store data?

Is there a better way to store numerical data in an uint64 other than using x digits for one piece, y digits for other stuff? (20 digits total to work with) I am trying to store information about an object without having the overhead of making a…
Chris G
  • 57
  • 9
0
votes
1 answer

How to find a random number between UInt64? (Swift)

I'm having trouble trying to find a way to return a random number between 1 and 9,000,000,000,000,000 I have made a randomNumberBetween function using UInt32 but I just havn't been able to do the same using a UInt64. I understand arc4random_uniform…
Troy R
  • 426
  • 2
  • 16
0
votes
4 answers

How to initialize a uint64_t array to 0 in C++?

I'm using Atmel 6.2 and writing an application for Arduino. I have a problem with these lines of code: int total = 3; uint64_t myarray[total] = {}; It gives the following error error: array bound is not an integer constant before ']' token Why…
Kaya311
  • 545
  • 2
  • 9
  • 21
0
votes
2 answers

Printing std::bitset in C++11

Consider the following code written in C++11: #include #include #include int main() { std::uint64_t a = 0000000000000000000000000000000000000000000000001111111100000000; std::bitset<64> b(a); std::cout <<…
Romain
  • 1,385
  • 2
  • 15
  • 30
0
votes
0 answers

Difference between unsigned long long and unsigned long long *

I am having an odd memory bug. The code is simple: void *to = calloc(2, sizeof(uint64_t)); ... int add_symbol_to_symbol(void *from, void *to) { uintptr_t *fromSymbol; uintptr_t *toSymbol; uint64_t i; fromSymbol = (uintptr_t*) from; …
arinmorf
  • 1,374
  • 16
  • 27
0
votes
1 answer

uint64 array to uint128 for SSE2

I have two similar issues when handling arrays when defined in the asm and when passed from c++ to asm. The code works fine inline but I need to separate them from the cpp into an asm file. The compiler may not throw an error or warning but the end…
Elegant
  • 143
  • 2
  • 15
0
votes
2 answers

Cannot invoke with an argument list of type '(UInt64)'

I am building a robotic arm and going to control the arm with an iOS application. I am having trouble sending the position to the arduino bluetooth 4.0 shield. I am using sliders to control the position of the arm. There are TWO errors. "cannot…
Luke Curran
  • 77
  • 10
0
votes
1 answer

Best way to convert uint64_t to jlong

I am writing a JNI code and encounter a situation where I will need convert uint64_t to jlong, and here's my current way to convert uint64_t to jlong: jlong uint64_t_to_jlong (uint64_t value) { if (value > std::numeric_limits::max()) { …
keelar
  • 5,814
  • 7
  • 40
  • 79
0
votes
2 answers

Wireshark dissector UINT64 bitmasking

I see that the bitmask field in the header_field used in proto_register_field_array(const int parent, hf_register_info *hf, const int num_records); is a guint32, therefor I cannot use a 64 bit mask. Is there anyway I can go around? Specifically, I…
gigashock
  • 3
  • 2
0
votes
1 answer

How to print space in uint64_t (C)

When I try this: #include #include int main (int argc, char **argv) { uint64_t key = 0xf0000000ffffffff; printf ("key=%" PRIx64, key, "\t\n %" PRIx64, "\n", key); } It prints key=f0000000ffffffff; all whitespaces are…
hola
  • 930
  • 1
  • 17
  • 35
0
votes
1 answer

Adding UInt64 in array without "\( )" gives unexpected value in swift

Adding UInt64 in array without "( )" gives unexpected value var arr : Any[] = [] var no : UInt64 = 9971989999 arr.append(no) println(arr) While with "( )" gives correct value var arr : Any[] = [] var no : UInt64 =…
Rachit
  • 814
  • 9
  • 19
0
votes
3 answers

uint64_t has incorrectly reached 18,446,744,071,590,568,320

Whenever I input an age of 65 or less, I get a number somewhere less than 2,100,000. However, when I input an age of 68 or higher, the result is instantly put at 18,446,744,071,590,568,320, which is the maximum value for uint64_t. I have no idea why…
carljalal
  • 637
  • 6
  • 16
0
votes
4 answers

Convert decimal to unsigned decimal (or string?) in C#

I have a variable, DifferenceAmt, which is a decimal. It can be either negative or positive. I need to output the value of DifferenceAmt, but without the negative sign if it's negative, as a string. I know how to delete the negative sign by checking…
Melanie
  • 3,021
  • 6
  • 38
  • 56
0
votes
1 answer

Unsigned long long serialization in boost

I am compiling a c++ code on a linux ubuntu with g++4.8.1 and boost 1.55.0. My program uses a class A, which has a member table which is an unsigned long long array. The same class has other members which are simple int. I am using boost to…
z_fly_away
  • 37
  • 12
0
votes
1 answer

NSMutableIndexSet addIndex: Method Throws Error

In trying to delete some objects from Core Data, I am running into some difficulty using the NSMutableIndexSet class and it's method 'addIndex:'. In core data I have folder objects, which contain a set of thread objects. Each thread has a threadId…
jac300
  • 5,182
  • 14
  • 54
  • 89