Questions tagged [int64]

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

int64 is a datatype that represents an (a whole number, not a fraction) and is coded on 64 bits in memory. Unlike its counterpart which is , int64 can be used to store positive and negative integers of values between -263 to 263 - 1.

260 questions
5
votes
3 answers

How to write INT64 to CString

I am coding in c++ windows. INT64 dirID = -1; CString querySQLStr = _T(""); querySQLStr.Format(L"select * from ImageInfo where FolderPath=%64d;", dirID); querySQLStr always like this: select * from ImageInfo where FolderPath= …
sxingfeng
  • 971
  • 4
  • 15
  • 32
5
votes
3 answers

Endianness of 64 int64_t on 32 bits systems

I would like to know, if the types that are larger than the native machine word, and that have compiler abstraction support, like int64_t on a 32 bits system, have any specification on the byte order in memory ? For example, on little endian…
v.oddou
  • 6,476
  • 3
  • 32
  • 63
5
votes
5 answers

How to declare an Int64 constant?

i'm trying to define a constant in Delphi: const FNV_offset_basis = 14695981039346656037; And i get the error: Integer constant too large Note: 14,695,981,039,346,656,037 decimal is equal to 0x14650FB0739D0383 hex. How can i declare this Int64…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
6 answers

Why does var get resolved as a Double and not Long?

In the following code, I would expect var to get resolved to an Int64, but it gets resolved to a double. Why is it so? string a = "1234"; bool asInt = true; var b = (asInt) ? Int64.Parse(a) : Double.Parse(a) ; Console.WriteLine(b.GetType());
Ayush
  • 41,754
  • 51
  • 164
  • 239
4
votes
3 answers

How to sort a part of an array with int64 indicies in C#?

The .Net framework has an Array.Sort overload that allows one to specify the starting and ending indicies for the sort to act upon. However these parameters are only 32 bit. So I don't see a way to sort a part of a large array when the indicies…
Fantius
  • 3,806
  • 5
  • 32
  • 49
4
votes
0 answers

convert pandas Series with large integer strings and Nones to nullable Int64 without precision loss

I have a pandas Series with large integers as strings and Nones, and want to convert this to pandas Int64 (nullable integer) without precision loss. Casting to float (what e.g. pd.to_numeric does) leads to precision loss. What is a good way to do…
Florian
  • 41
  • 1
4
votes
1 answer

Multiplying __int64's

Can someone explain to me (in detail) how to multiply two __int64 objs and check if the result will fit in __int64. Note: Do not use any compiler or processor dependent routines.
There is nothing we can do
  • 23,727
  • 30
  • 106
  • 194
4
votes
2 answers

Convert array of bytes to Int64 in Swift 5

I am processing various arrays of UInt8 (little endian) and need to convert them to Int64. In Swift 4 I used let array: [UInt8] = [13,164,167,80,4,0] let raw = Int64(littleEndian: Data(array).withUnsafeBytes { $0.pointee }) print(raw)…
Mike Nathas
  • 1,247
  • 2
  • 11
  • 29
4
votes
0 answers

Passing an Int64 from .net service to Javascript using BigInt

I am trying to pass an Int64 number from a .Net service into javascript while maintain the precision using BigInt. It seems however that Javascript is rounding this number before I can cast it as a BigInt. In the service, I am returning the Int64…
Radderz
  • 2,770
  • 4
  • 28
  • 40
4
votes
0 answers

Swift JSONDecoder decode Int64 on iOS 10

There is a bug in iOS 10, that Swift 4's JSONDecoder does not decode some huge 64 bit integers from JSON with error "Parsed JSON number <1522853867156381000> does not fit in Int64." This is not happening in iOS 11 and it is a known bug None of…
shelll
  • 3,234
  • 3
  • 33
  • 67
4
votes
1 answer

How can I plot int64 values in Matlab?

I am trying to plot a set of int64 numbers in Matlab R2013a. As an example of what I am trying to achieve is shown below: array_of_longs = [13286492335502040542 13286492335502040923 13286492335502042285 13286492335502042469 13286492335502042826…
Sadia1990
  • 97
  • 1
  • 1
  • 11
4
votes
3 answers

How do I prevent Long / Int64 ToString() converting to Exponential Format?

Running .NET 4.6 and x64 build options. No ToString() format option seems to work for numbers over 15 digits in length, as it converts them to Exponential Format. What I have tried so…
HouseCat
  • 1,559
  • 20
  • 22
4
votes
2 answers

Golang: Combine two numbers

I feel quite stupid asking this but how can I archive the following in GO? Let's say I have two int32 which both have the value 33. How can I combine them into one int32 with the value 3333 instead of 66?
Backslash
  • 343
  • 5
  • 12
4
votes
2 answers

How do I convert 64-bit hexadecimal strings in R?

How do I convert 64-bit hexadecimal strings in R? > library(int64) > as.int64("7f2d36a2a000") [1] NA Warning message: In as.int64("7f2d36a2a000") : NAs introduced > as.int64("0x7f2d36a2a000") [1] NA Warning message: In as.int64("0x7f2d36a2a000") :…
kgibm
  • 852
  • 10
  • 22
4
votes
2 answers

How does size_t and the __w64, time_t and __int64 work?

I am not a veteran in C or C++. I don't know the howtime_t is defined and designed. Several posts like: What is ultimately a time_t typedef to? What is size_t in C? Difference between size_t and std::size_t But these posts only state what is…
Zachary
  • 1,633
  • 2
  • 22
  • 34