uint64 Questions

8

Solved

I am trying to convert from a string to a uint64_t integer. stoi returns a 32 bit integer, so it won't work in my case. Are there other solutions?
Ambroseambrosi asked 21/2, 2017 at 1:6

2

Solved

I'm seeking for a macro representing the maximum value of uint64_t as UINT_MAX is for unsigned int. i.e. I need this value to guaranteed to be (1<<64)-1. I tried to use UINT64_MAX, but compi...
Yours asked 30/4, 2013 at 11:20

5

Solved

Consider the following brief numpy session showcasing uint64 data type import numpy as np a = np.zeros(1,np.uint64) a # array([0], dtype=uint64) a[0] -= 1 a # array([18446744073709551615], dt...
Acierate asked 30/4, 2023 at 16:50

3

Solved

I'm looking at the numeric types in Go. I want to use uint64 literals. Is this possible in Go? Here's an example of how I'd like to use uint64 literals: for i := 2; i <= k; i += 1 { // I want ...
Oubre asked 19/12, 2015 at 22:41

4

Solved

I am having following code. output of second %d in sprintf is always shown as zero. I think i am specifying wrong specifiers. Can any one help me in getting write string with right values. And this...
Lodovico asked 28/2, 2011 at 10:37

3

Solved

I have made the following code as an example. #include <iostream> struct class1 { uint8_t a; uint8_t b; uint16_t c; uint32_t d; uint32_t e; uint32_t f; uint32_t g; }; struct class...
Gothar asked 15/10, 2014 at 11:16

5

Solved

I am using MPIR 2.4.0 on Windows (MSVC 2010) and I was trying to add an unsigned 64bit integer to a mpz_t number. However it seems that MPIR/GMP does not support direct conversion between 64bit Int...
Deaconess asked 6/7, 2011 at 14:41

3

Assume there is a string holding the address of an uint64 type variable, can we parse this address back to an *uint64? For example: i := uint64(23473824) ip := &i str := fmt.Sprintf("%v", ip...
Comply asked 10/3, 2015 at 15:20

8

Solved

In C#, how can one store and calculate with numbers that significantly exceed UInt64's max value (18,446,744,073,709,551,615)?
Fcc asked 19/8, 2009 at 9:35

3

Solved

The problem with the following code: var x uint64 = 18446744073709551615 var y int64 = int64(x) is that y is -1. Without loss of information, is the only way to convert between these two number ...
Grater asked 13/11, 2014 at 14:3

1

In the following code: #include <iostream> ... uint64_t t1 = 1510763846; uint64_t t2 = 1510763847; double d1 = (double)t1; double d2 = (double)t2; // d1 == t2 => evaluates to true someh...
Trash asked 15/11, 2017 at 16:43

7

Solved

What's the easiest way to convert an uint64 value into a standart C++ string? I checked out the assign methods from the string and could find no one that accepts an uint64 (8 bytes) as argument. H...
Tuning asked 24/6, 2010 at 19:53

4

Solved

Let's think about the following situation. The Go routine creates a byte array where packs a Uint64 number 5577006791947779410 in 8 bytes Big Endian [77, 101, 130, 33, 7, 252, 253, 82]. In JavaSc...
Disembarrass asked 2/8, 2017 at 8:51

2

Solved

This is my code: package main import ( "strconv" "fmt" ) func main() { t := strconv.Itoa64(1234) fmt.Println(t) } Problem: Why does it cause the following error message? command-line-arg...
Scrag asked 31/8, 2012 at 17:21

4

Solved

How do you convert from NSString to UInt64? For example, something like this if a UInt64Value helper method existed: NSString *value = @"1234567"; UInt64 convertedValue = [value UInt64Value]; I...
Goldoni asked 24/3, 2016 at 17:8

4

Solved

How can I transfer uint64_t value to std::string? I need to construct the std::string containing this value For example something like this: void genString(uint64_t val) { std::string str; //......
Concupiscent asked 8/9, 2011 at 12:32

5

Solved

I have been using std::atoll from cstdlib to convert a string to an int64_t with gcc. That function does not seem to be available on the Windows toolchain (using Visual Studio Express 2010). What i...
Bombe asked 7/7, 2011 at 12:25

2

I realize this question could be processor dependent, but hopefully someone can point me in the right direction. For the life of me, I cannot figure out how to convert an unsigned long long int rep...
Chiles asked 23/5, 2013 at 14:42

1

Solved

I am trying to create a universal hashing alogrithim that hashes a string as a 64 bit int. I am able to hash the strings correctly: sql: select convert ( varchar(64), HASHBYTES ( 'SH...
Minnesota asked 22/3, 2013 at 21:14

5

Solved

I encountered a strange thing when I was programming under c++. It's about a simple multiplication. Code: unsigned __int64 a1 = 255*256*256*256; unsigned __int64 a2= 255 << 24; // same as t...
Verticillate asked 20/9, 2012 at 13:46

5

Solved

Learning the hard way, I tried to left shift a long long and uint64_t to more than 32 bits on an x86 machine resulted 0. I vaguely remember to have read somewhere than on a 32 bit machine shift ope...
Hoofed asked 8/5, 2012 at 12:59

3

Solved

This feels like a stupid question, but I can't seem to see the answer. I have an UInt64, which is supposed to have a max value of UInt64.MaxValue 18446744073709551615 However, when I try to ass...
Genetic asked 15/4, 2012 at 23:52

2

Solved

What is the difference between stdint.h and inttypes.h? If none of them is used, uint64_t is not recognized but with either of them it is a defined type.
Gurias asked 29/9, 2011 at 12:2

3

In Delphi 7, int64s are signed, if I try to declare a hex constant larger than $8000000000000000 (eg, what is really an uint64) I get an error. Can you advise some workarounds, please?
Monocular asked 16/6, 2011 at 20:20

3

Solved

I tried sscanf(str, "%016llX", &int64 ); but seems not safe. Is there a fast and safe way to do the type casting? Thanks~
Unshod asked 9/11, 2010 at 9:49

© 2022 - 2024 — McMap. All rights reserved.