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
3
votes
1 answer

Yojson to parse int64 (ocaml)

As of my understanding this {"xxx": 1000000000000000} is valid right? Not sure how to parse it with Yojson.Safe. I'm looking for something like _ `Int64 of int64 _ , but none provided, there are only _ `Int of int _ and _ `Intlit of string _ on the…
romerun
  • 2,161
  • 3
  • 18
  • 25
3
votes
4 answers

Converting __int64 to long in Windows

How to convert __int64 to long in Windows (MSVC8 & MSVC6)? Will a normal typecasting work? Also, how about converting long to __int64? If the long is a negative value, will it work? Note - I am talking of a scenario in which the __int64 variable…
Jay
  • 24,173
  • 25
  • 93
  • 141
3
votes
2 answers

SHR on int64 does not return expected result

I'm porting some C# code to Delphi (XE5). The C# code has code like this: long t = ... ... t = (t >> 25) + ... I translated this to t: int64; ... t := (t shr 25) + ... Now I see that Delphi (sometimes) calculates wrong values for…
3
votes
1 answer

Why isn't my type constructor being recognized

I'm entirely new to Julia (just started earlier today), so forgive me if this is a silly question, but despite loving the language, I'm not finding a lot of great debugging help out there. Basically I just want to define an alternate constructor for…
Slater Victoroff
  • 21,376
  • 21
  • 85
  • 144
3
votes
3 answers

Saving 64-bit integer with QSettings

Is there any neat way, short of converting number to QByteArray, to save quint64 with QSettings? The problem is QVariant doesn't accept qint64 nor quint64.
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
3
votes
1 answer

Should I use static_cast or INT64_C to assign 64-bit constant portably?

Assigning a 64-bit constant as int64_t foo = 0x1234LL; is not portable, because long long isn't necessarily int64_t. This post Which initializer is appropriate for an int64_t? discusses use of INT64_C() macro from , but isn't it also…
Masked Man
  • 1
  • 7
  • 40
  • 80
3
votes
2 answers

C++: how to check, that enum has only unique values

we use VS 2008 there is a big enum, which is populated by many developers this enum has a type __int64 (a Microsoft extension), and I want to make compiler complain about non unique values in enum. if it was a usual enum I would do like this: enum…
Alek86
  • 1,489
  • 3
  • 17
  • 26
2
votes
6 answers

How do I emulate 256-bit integer math ops on a system with only a 32-bit int?

I'd like to write a deadsimple bignum class using a series of (unsigned) integers. I can loosely see how addition and subtraction would work, but division and multiplication is another story. I know 32-bit compilers can emuate 64-bit int's by…
rubenvb
  • 74,642
  • 33
  • 187
  • 332
2
votes
2 answers

converting char array (c string) to _int64 in C

I tried this function to convert a string to _int64 but it didn't work : _int64 lKey = _atoi64("a1234"); lKey value is always zero and doesn't work except the string is only digits like "1234" I read solutions using C++ string stream but I want to…
Ahmed
  • 3,398
  • 12
  • 45
  • 64
2
votes
1 answer

C++: converting __int64 to unsigned long

I'd like to use the following function in windows and linux, but I am not sure how to convert an __int64 to unsigned long. Is it safe to cast the value like I did? getTimeInMilliseconds() { #ifdef _WIN32 static const __int64 magic =…
Pedro
  • 21
  • 1
  • 2
2
votes
1 answer

Why does Pivot table return Int64 Type Error?

I'm trying to pivot a dataframe but it keeps returning an Int64 Error. A similar question was not actually answered - What causes these Int64 columns to cause a TypeError? Here's the type of my dataframe: # Column Non-Null Count Dtype ---…
2
votes
1 answer

Convert time to integer with CAST in SQL

I want to have the average trip_duration for values that are over 0, so i thought to cast time as int64 TO be able to campare it to 0 in the where clause, but it didn't really work. (SELECT (ended_at-started_at) as trip_duration FROM…
ANES
  • 21
  • 1
2
votes
1 answer

Geting error: 'Int64Index' object has no attribute 'get_values'. What am I doing wrong?

I'm kinda new to Data Science and I'm struggling with this project, I would appreciate some help. So, I'm working with some .shp files to get some choropleth-like maps with some other functions, that for my luck are not working because of this error…
Jesus Trejo
  • 21
  • 1
  • 2
2
votes
1 answer

python read Large integers in excel

I have an excel with following 3 large integers (in fact, they are ids). But in excel it will be stored in scientific mode. And when I use pandas to read the excel, I will lost precision since the integer is too large for int64 to store it. Example…
htam_ujn
  • 23
  • 5
2
votes
2 answers

Splitting an int64 into two int32, performing math, then re-joining

I am working within constraints of hardware that has 64bit integer limit. Does not support floating point. I am dealing with very large integers that I need to multiply and divide. When multiplying I encounter an overflow of the 64bits. I am…
Duxa
  • 966
  • 2
  • 14
  • 27