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

Applying formula on Timestamp in milliseconds in C++ gives me 0 always?

I have a method below which will accept oldTimestamp as the input parameter which is uint64_t... Now I need to apply a formula on the above oldTimestamp and whenever I apply that formula, I always get 0 as start value. And also I try to get the…
user2467545
0
votes
1 answer

Empty char* successfully converting into valid unsigned int64 game ID?? HOW?

I'm working on a game and I ran into a strange little issue... I was wondering if anyone here would be able to figure this out and explain it to me (it's eating me up!) Firstly, here's the relevant code. // even if this data is not set, it returns…
Jace
  • 3,052
  • 2
  • 22
  • 33
0
votes
1 answer

convert u_int64_t to u_char on CUDA 2.3 nvopencc

CUDA 2.3 V0.2.1221 / 32bit linux Hi, I have a problem with the following code: __device__ void put_u64(void *vp, u_int64_t v) { u_char *p = (u_char *) vp; p[0] = (u_char) (v >> 56) & 0xff; p[1] = (u_char) (v >> 48) & 0xff; p[2] = (u_char) (v >> 40)…
fta
  • 1
  • 1
0
votes
1 answer

Converting Uint64 to 5 bytes and vice versa in c#

I have an application that expects 5 bytes that is derived of a number. Right now I am using Uint32 which is 4 bytes. I been told to make a class that uses a byte and a Uint32. However, im not sure how to combine them since they are numbers. I…
Michael Hartmann
  • 574
  • 7
  • 24
0
votes
2 answers

C#: How to concatenate bits to create an UInt64?

I'm trying to create a hashing function for images in order to find similar ones from a database. The hash is simply a series of bits (101110010) where each bit stands for one pixel. As there are about 60 pixels for each image I assume it would be…
Thomas
  • 4,030
  • 4
  • 40
  • 79
0
votes
1 answer

How to cast unsigned int to uint64

I would like to convert unsigned int to uint64 inside C function. uint64 is defined in R package int64. EDIT This question is about conversion from C unsigned int data type to uint64 R language data type. "int64 package has been developped so that…
Wojciech Sobala
  • 7,431
  • 2
  • 21
  • 27
0
votes
2 answers

Weird dynamic linking on iPhone

The following code crashes in an Xcode created template project. int main(int argc, char *argv[]) { uint64_t t64 = 100000; double s = (double)t64; // Crash! ... The crash is accompanied with the following console output and occurs on a…
Robin
  • 565
  • 1
  • 6
  • 9
0
votes
1 answer

Standard bit representation of uint64_t?

I know that for floating point numbers IEEE has a standard representation format - IEEE 754. Is there a standard representation for uint64_t?
polerto
  • 1,750
  • 5
  • 29
  • 50
0
votes
2 answers

64 bit integer initialization error in Visual Studio 2010 SP1

I have a weird bug/error/self stupidity concern. I'm developing a small application in C, and I'm using Visual Studio 2010 SP1. The offending code: uint64_t sum_squared_X = 65535*65535*64; int64_t sum_squared_Y = 65535*65535*64; When debugging, I…
STaRGaZeR
  • 23
  • 1
  • 5
0
votes
2 answers

Loading a BigInteger with a large, positive, number

I'm trying to port a code from .NET which uses UInt64 everywhere, I've mostly succeeded using BigInteger, but unfortunately I've become stuck at something really simple as loading a BigInteger with a value from a table of hex values. At some point I…
SoManyGoblins
  • 5,605
  • 8
  • 45
  • 65
-1
votes
2 answers

python ctypes module how to transfer uint64_t from c++func return to python int,not set restype=c_long_long

i use python ctypes module to cal crc from c++ function it return uint64_t type. In python, i do not set restype(c_long_long), i get a python int value -870013293 , however set restype the value is 14705237936323208851. can you tell me the relation…
nemo
  • 3
  • 1
-1
votes
1 answer

How exactly find out length of ADT vector in C which is type of uint64_t?

I am trying to find out how to find the length of an ADT array type of uint64_t in C. The code that provides the function for find length of array: void func(uint64_t *arr , const char *restrict sep){ int size = sizeof(arr) / sizeof(arr[0]); …
Leviathan
  • 5
  • 1
  • 7
-1
votes
2 answers

strconv.ParseInt: parsing "18446744073709551615": value out of range

Is it a normal behavior when parsing uint64 max value with strconv.ParseInt? i, err := strconv.ParseInt("18446744073709551615", 10, 64) fmt.Println(i, err) I got an error: "strconv.ParseInt: parsing "18446744073709551615": value out of range", when…
Ali Mamedov
  • 5,116
  • 3
  • 33
  • 47
-1
votes
1 answer

How to calculate modular multplication of array elements to integers in c?

Consider the following: uint8_t message[15] = { 0x32, 0xdc, 0x21, 0x55, 0x3f, 0x87, 0xc8, 0x1e, 0x85, 0x10, 0x43, 0xf9, 0x93, 0x34, 0x1a }; uint64_t num = 0xa1b2c33412; I want to multiply the above variable num to the array message[]. The…
abbasi_ahsan
  • 340
  • 1
  • 11
-1
votes
2 answers

Why uint64_t cannot show pow(2, 64) - 1 properly?

I'm trying to understand why uint64_t type can not show pow(2,64)-1 properly. The cplusplus standard is 199711L. I checked the pow() function under C++98 standard which is double pow (double base , double exponent); float pow (float base …
Diame
  • 39
  • 1
  • 7
1 2 3
12
13