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
4
votes
3 answers

Setting all bits in int64_t

From following code I expect to set all bits in x to 1, but somehow only first 32 bits are set: int64_t x = 0xFFFFFFFF; x<<32; x|=0xFFFFFFFF; Note: printing x after each line results in 4294967295 (32 lower bits set to 1). Also, tried using…
R_N
  • 111
  • 9
4
votes
1 answer

How to use Int64(long) in php but not string?

How to user Int64 in php like dotnet、java、c++? For example: The datatype is bigint(20) in mysql,I want to save value from php.I know one solution is using string in mysql procedures. table case: CREATE TABLE `test_int64` ( `id` bigint(20)…
slimboy
  • 55
  • 1
  • 2
  • 8
4
votes
3 answers

C# Convert a number larger than Int64 to HexaDecimal

I am trying to convert a big number(ex: 9407524828459565063) to Hexadecimal(ex: 828E3DFD00000000) in C#. The problem is that the number is larger than Int64's max value. i looked up everywhere and couldn't find a working solution. Any help over…
Salem
  • 311
  • 2
  • 12
3
votes
3 answers

Combine Two Int32 Into An Int64

Have Dictionary that gets used a lot. I mean in a loop that runs for days in a big data load. The Int64 comess from two Int32. The byte happens to be the distance (count) between those two Int32 from many very long lists. What I…
paparazzo
  • 44,497
  • 23
  • 105
  • 176
3
votes
4 answers

in php5, how to stop GET from (wrongly) converting into numeric?

in relation to php int64 limits, if the uri has a int64 argument, how do you prevent GET from wrongly converting it into numeric and simply keeping it as a string? http://some.com?id=1707541557936130 then echo $_GET['id'] =>…
cc young
  • 18,939
  • 31
  • 90
  • 148
3
votes
1 answer

php5 converts 64 bit integer to double - how force 64-bit?

in php5, pass a 64bit integer, 1707541557936130 through GET, but it shows value of 1.7075415579361E+15 how can I force php to use large integers as integers, not as float when I shift << apparently the result of that is int32 as well, not int64 is…
cc young
  • 18,939
  • 31
  • 90
  • 148
3
votes
1 answer

Converting int64 to NSData

I need to convert a long value from int64 to NSData, so I can later run a hash algorithm on it. I perform: int64_t longNumber = 9000000000000000000L; NSMutableData *buffer = [NSMutableData dataWithBytes:&longNumber…
Demon Kid
3
votes
1 answer

Why pd.read_csv get wrong value when using dtype = 'Int64'?

import pandas as pd When there is no na values, It's right. !cat id1 1471341653427101696 1458379213265436885 pd.read_csv('id1',sep ='\t',header=None, na_values=['\\N'],dtype =…
Li Xing
  • 59
  • 7
3
votes
1 answer

`LL` vs `i64` suffix in C++ Visual Studio compiler

I'm trying to refactor an old C++ code. At some point I've something like: #if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) # define I64_CONST(X) X ## i64 #else # define I64_CONST(X) X ## LL #endif So for defining a 64-bit…
Jepessen
  • 11,744
  • 14
  • 82
  • 149
3
votes
1 answer

Incorrect passing of uint64_t to va_list

I am writing a custom printf function and a uint64_t seems to be passed incorrectly to va_list: Problematic point: printf("Number is %C, and the next one is %C", 0xff00ffb7, 0xffffffff); Part of my printf implementation that produces the incorrect…
frogstair
  • 444
  • 5
  • 20
3
votes
4 answers

Huge file support for Delphi 6? (replacement for System module?)

I am running into problems interacting with a huge fixed length record data file. The file is over 14 GB in size. I first noticed a problem when I saw the return value from the System.Filesize() function was far less than the actual number of…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
3
votes
2 answers

malloc error when generating huge random number

I want to get a random element from 0 to a huge number (2^31). I tried creating an Array from such a Range (so I can use Swift's Array.randomElement), as done here: let myArray: [Int64] = [Int64](0...4294967292) Which compiles, but crashes…
user5306470
3
votes
1 answer

uniqueidentifier is incompatible with bigint entity framework c# code first

I have this entity in my EF code First public class Equipment { public Int64 Id { set; get; } public string Name { set; get; } public string Model { set; get; } public string Factory { set; get; } public…
Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180
3
votes
2 answers

If on my machine sizeof(long) == sizeof(long long), why aren't they the same type?

If I run: #include #include int main() { std::cout << "sizeof(long) = " << sizeof(long) << "\n"; std::cout << "sizeof(long long) = " << sizeof(long long) << "\n"; std::cout << "std::is_same
einpoklum
  • 118,144
  • 57
  • 340
  • 684
3
votes
2 answers

Large lua numbers are being printed incorrectly

I have the following test case: Lua 5.3.2 Copyright (C) 1994-2015 Lua.org, PUC-Rio > foo = 1000000000000000000 > bar = foo + 1 > bar 1000000000000000001 > string.format("%.0f", foo) 1000000000000000000 > string.format("%.0f",…
Mediocre Gopher
  • 2,274
  • 1
  • 22
  • 39