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

C/C++ Initialise double with hex

I want to initialise a double with a hex constant. double dbl = 0xFEDCBA9876543212; printf("dbl: %llX\n", (uint64_t)dbl); I would expect to see as the output: dbl: FEDCBA9876543212 But I am getting: dbl: FEDCBA9876543000 Why is this and why are…
John
  • 10,837
  • 17
  • 78
  • 141
2
votes
1 answer

Merging uint8 array into uint64 error

I am trying out this code where I first split a uint64 number into an array of uint8, followed by merging the said array back into the original number. However when I attempt to print out the number out, it seems to return the max value of…
John Tan
  • 1,331
  • 1
  • 19
  • 35
2
votes
2 answers

Copying internal formats float64 uint64

I'm using Numpy and Python. I need to copy data, WITHOUT numeric conversion between np.uint64 and np.float64, e.g. 1.5 <-> 0x3ff8000000000000. I'm aware of float.hex, but the output format a long way from uint64: In [30]: a=1.5 In [31]:…
2
votes
1 answer

Confused by UInt64

The code snippet below demonstrates a problem I am having with with text IO and UInt64 type variables in Delphi XE2 recently re-installed from a recent ISO image file - the compile fails with an error message relating to a missing Text.ReadUInt64…
Penguino
  • 2,136
  • 1
  • 14
  • 21
1
vote
3 answers

adding "int" with "uint_64t"

There are three variables with the following types uint64_t old_addr, new_addr; int delta; and I want to do this assignment new_addr = old_addr + delta; However the problem is, when old_addr=915256 and delta=-6472064, the new_addr becoms…
mahmood
  • 23,197
  • 49
  • 147
  • 242
1
vote
1 answer

Which consumes less space, UInt64 or a string in C#

What will be the best idea in the context of C#, In C# i am using a dictionary. I want it to use less memory space. what will be better? A dictionary where the key type is Uint64 or where the key type is a string? in both cases the value is a…
P basak
  • 4,874
  • 11
  • 40
  • 63
1
vote
3 answers

Runtime error, makes my .exe crash and I am not sure why

I can take a guess that it has something to do with working with the unsigned long long int. #include #include #include using namespace std; typedef unsigned long long int uint64; int main(int argc, char…
ParoX
  • 5,685
  • 23
  • 81
  • 152
1
vote
2 answers

Not able to assign 64-bit value to uint64_t in C

I have the following piece of simple C code where I simply try to assign a 64-bit value to uint64_t. However, the assignment happens as 32-bit value only and the most significant 32-bit are always zero. Not sure, what I am missing. /* C code :…
G Dave
  • 19
  • 1
1
vote
1 answer

Need help understanding ida pseudocode

I am new to reversing. I have stumbled upon a line of code which I am unable to understand. return (*(_int64(**)(void))(**(_QWORD **)(v1 + 0x3C8) + 0x68LL ))(); The code is for arm64 lib. So , what I understood is that it's returning a pointer out…
Akram Raza
  • 11
  • 3
1
vote
2 answers

NumberFormatter and unsigned with UInt64.max

I'm trying to create a string representing UInt64.max using NumberFormatter. Here's the code: let formatter = NumberFormatter() formatter.usesGroupingSeparator = true formatter.numberStyle = .decimal formatter.positiveFormat = "#…
Phantom59
  • 947
  • 1
  • 8
  • 19
1
vote
1 answer

Value of variable changes with unrelated code

I struggle with a bug since hours now. Basically, I do some simple bit operation on an uint64_t array in main.c (no function calls). It works properly on gcc (Ubuntu), MSVS2019 (Windows 10) in Debug, but not in Release. However my target…
geohei
  • 696
  • 4
  • 15
1
vote
0 answers

setting index value to np.uint64 in a panda dataframe changes its type to int64

I am trying to set the dtype on the index of a panda dataframe import pandas as pd import numpy as np a = pd.DataFrame(columns=['value']) a.loc[np.uint64(3)] = [3] # Here I would expect to get UINT64 but it's INT64 a.index.dtype >…
Olivierwa
  • 143
  • 1
  • 9
1
vote
0 answers

UINT_64 causing errors in Athena

Here's my issue with unsigned integers in our source database (MySQL RDS): I use AWS DMS to do an initial load of the source table and the target is S3 (our Zone1 of our data lake) saved as parquet. I can then crawl it with Glue and query the table…
1
vote
3 answers

Breaking down an uint64_t to an array of uint8_t - C

I would like to convert a 64 bit unsigned int into an array of uint8_t in C.
kimbanu27
  • 27
  • 2
1
vote
1 answer

Casting from uint64_t to double results in incorrect values

When casting from a large uint64_t value to a double. The results are not as expected. Why is this, and is there a way to solve it. I'm using gcc 8.3.0 int main { uint64_t var64 = 844421103279395000; printf("var64 = %llu\n", var64 ); …
Engineer999
  • 3,683
  • 6
  • 33
  • 71