bigint Questions

4

Solved

I have a Bigint column in my Table in SQL server as a Primary Key and when I request from a client with axios or fetch in React, it has a problem with ids like 9223372036854775800 and converts all ...
Covering asked 5/5, 2019 at 17:11

7

It turns out (outer a bit of thought it's more obvious but whatever) that BigInt recently introduced to javascript has a limit: My question would be - is there a constant similar to Number.MAX_S...
Ingrain asked 16/11, 2018 at 10:6

7

Solved

I'm looking for a way to force JSON.stringify to always print BigInts without complaining. I know it's non-standard, I know there's a package for that in pure JavaScript; but it doesn't fit my need...
Premer asked 5/12, 2020 at 0:0

5

Solved

i want to check if a number is a BigInt in a acceptable size if statement i know there is the solution function isBigInt(x) { try { return BigInt(x) === x; // dont use == because 7 == 7n but 7 !...
Faceplate asked 28/2, 2021 at 23:24

11

What is the best way to handle large numeric inputs in C++ (for example 10^100)? For algorithms I usually switch over to ruby and I sometimes use strings. Any other good methods?
Vorous asked 22/9, 2008 at 20:31

4

Solved

I found myself in the situation where I wanted to convert a BigInt value to a Number value. Knowing that my value is a safe integer, how can I convert it?
Wheelchair asked 29/12, 2018 at 15:1

4

I need to convert a string to BigInt like BigInteger in Javascript Example var reqId = "78099864177253771992779766288266836166272662"; var result = parseInt(reqId); document.write(result); Resu...
Melisamelisande asked 24/4, 2016 at 17:48

8

Solved

There is an x86 assembly instruction ADC. I've found this means "Add with carry". What does this mean/do? How would one implement the behavior of this instruction in C++? INFO: Compiled o...
Derward asked 11/11, 2010 at 11:21

3

Solved

I am trying to add BigInt support within my library, and ran into an issue with JSON.stringify. The nature of the library permits not to worry about type ambiguity and de-serialization, as everyth...
Thousandfold asked 5/10, 2019 at 15:54

5

Solved

As you know that GraphQL has no data type like long int. So, whenever the number is something big like 10000000000, it throws an error like this: Int cannot represent non 32-bit signed integer valu...
Drag asked 14/7, 2020 at 11:0

1

Solved

So I am trying to update some typescript code that uses external library for big numbers to BigInt (ES2020) and linter is complaining a lot. I don't really understand what is going on here. It loo...
Microphyte asked 14/6, 2023 at 20:25

2

Solved

I have the following code sample that should convert std::array<uint8_t> to BigInt i.e. boost::multiprecision::cpp_int. I compile this code with clang64 15.0.7 (С++17) from MSYS2. Code works ...
Aircrew asked 30/5, 2023 at 8:45

3

Solved

I have a large JSON file that contains bigints with their full values--not rounded like JavaScript loves to do by default. We have a workaround to deal with the bigints in Node.js, but I'm trying t...
Littman asked 21/7, 2020 at 16:24

3

Solved

I am doing a little research for a problem that might occur someday. Lets say you have an InnoDB MySQL table with an id and a name field. the id field has BIGINT(20) and is AUTO_INCREMENT plus its...
Nature asked 22/9, 2017 at 13:0

4

Solved

When I parse this little piece of JSON: { "value" : 9223372036854775807 } This is what I get: { value: 9223372036854776000 } Is there any way to parse it properly?
Grissel asked 12/9, 2013 at 3:59

1

Solved

I get this error when attempting to do >> or >>= on a BigInt: no implementation for `BigInt >> BigInt using the num_bigint::BigInt library Edit: More Context: I am rewriting this ...
Acropolis asked 5/1, 2023 at 6:45

1

In the context of exploratory activity I have started to take a look at integer & fixed-point arithmetic building blocks for 32-bit platforms. My primary target would be ARM32 (specifically arm...
Monophthong asked 7/12, 2022 at 8:22

4

I'm trying to produce code (currently using clang++-3.8) that adds two numbers consisting of multiple machine words. To simplify things for the moment I'm only adding 128bit numbers, but I'd like t...
Reservation asked 13/11, 2015 at 10:36

4

Solved

I have a column in my dataset that has a datatype of bigint: Col1 Col2 1 1519778444938790 2 1520563808877450 3 1519880608427160 4 1520319586578960 5 1519999133096120 How do I convert Col2 ...
Veach asked 26/4, 2018 at 19:29

5

Solved

I’m using Rails 4.2.3 with a PostGre database. I want a column in my database to store a number of milliseconds — note, NOT a timestamp, but rather a duration in milliseconds. So I created my colum...
Carrington asked 29/5, 2016 at 21:25

6

Solved

Is there a way to get the logarithm of a BigInt in JavaScript? With normal numbers, you would use this code: const largeNumber = 1000; const result = Math.log(largeNumber); However, I need to work...
Orban asked 16/12, 2021 at 16:16

5

Solved

I am trying to calculate 100! (that is, the factorial of 100). I am looking for the simplest way to accomplish this using C. I have read around but have not found a concrete answer. If you must kno...
Klansman asked 27/7, 2010 at 3:21

4

Solved

I want insert all rows of a table into another table, and I also want convert a nvarchar field into bigint, but when I use convert(bigint, col1) SQL Server shows an error: Error converting data ...
Cloyd asked 29/4, 2011 at 6:7

1

I'm currently doing a primality test on huge numbers (up to 10M digits). Right now, I'm using a c program using the GMP library. I did some parallelization using OpenMP and got a nice speedup (3.5~...
Fathead asked 25/12, 2021 at 4:14

2

Solved

I need to generate 512 bit BigInts, but I'm not sure which of the two below is true: 512 bits means 512 digits of 1010101010...001010 which are then converted to the decimal it represents? Or doe...
Pincushion asked 1/4, 2014 at 7:28

© 2022 - 2025 — McMap. All rights reserved.