Skip to main content
Best practices
3 votes
6 replies
142 views

I am working on a multiplication routine in a big integer library in POSIX C99 with a signature of bigint_st *bigint_mul(bigint_st *dest, const bigint_st *a, const bigint_st *b). Many of the routines ...
Eric Pruitt's user avatar
  • 1,903
1 vote
2 answers
108 views

Is it possible to parse a JSON string like '{id: 3458764513820541000}' using zod without resorting to an additional library like json-bigint?
Emre's user avatar
  • 6,269
0 votes
0 answers
51 views

I'm trying to manage BigInteger on MongoDB. I did a test, but it doesn't seem to work correctly. It is supposed to have the following poco: public class Poco { public string MyString { get; set; } =...
Attilio Gelosa's user avatar
2 votes
0 answers
240 views

I am developing an algorithm that multiplies large numbers. I am doing LeftLength x RightLength multiplications. Karatsuba algorithm does less multiplications. Currently, the algorithm is more ...
Fatih Doganay's user avatar
0 votes
0 answers
90 views

Private Sub routine() Dim bytes() As Byte Dim n As BigInteger = 1 Dim s As Integer = 1 If System.IO.File.Exists("resources.bin") Then Dim fs2 = New IO.FileStream(&...
George Robinson's user avatar
1 vote
0 answers
69 views

...such as infix operator fun BigInteger.plus(other: Int) = this + other.toBigInteger() infix operator fun Int.plus(other: BigInteger) = toBigInteger() + other infix operator fun BigInteger....
Boris's user avatar
  • 39
0 votes
0 answers
145 views

I want to implement Knuth's Algorithm D for division on C (Link to Knuth's book, p272). In step "D4. [Multiply and subtract.]", it states: if the result of this step is actually negative, (...
Daan's user avatar
  • 39
0 votes
1 answer
102 views

I can reproduce this 1 line all the time & I'm thrown off why .Net 8 x64 is converting to a negative decimal. BigIntegers have to be used because of the hex sizes. Conversion URL fact checking ....
JRrelyea's user avatar
  • 300
0 votes
0 answers
110 views

I am working with extremely large numbers and would like to verify my Karatsuba multiplication result ((2^136279841)-1)^2 which needs (532 344 * _m256i_epi64)^2 i.e. 4,258,752 uint64_t to store the ...
Caster's user avatar
  • 51
1 vote
1 answer
125 views

Knuth Algorithm D, during the normalization step (D1), states to set d to (b-1)//v_hi where b is the basis (word size or half-word size) and v_hi is the upper limb of the denominator. Then multiply ...
Duncan Townsend's user avatar
1 vote
1 answer
81 views

I have written this block of code, in an attempt to create a generic random array generator (quite an interesting approach, if I must say so myself) public unsafe class RandomArray<T> : ...
Lambda dot Joburg's user avatar
1 vote
1 answer
226 views

I think I have right algorithm, but when the values increase to 106 and more, I exceed the MEMORY or TIMELIMIT allowed. At first I tried to push the elements to a vector, then I changed the method to ...
lilof's user avatar
  • 15
5 votes
1 answer
183 views

I'm confused about the time complexity of this algorithm: function fib(n) if n = 0 return 0 else var previousFib := 0, currentFib := 1 repeat n − 1 times // loop is ...
Angela Liss's user avatar
1 vote
1 answer
406 views

I wrote my own BigIntegerConverter for JSON serialization/deserialization (.Net System.Text.Json) In the Read method I checked if ValueSequence is used ... string stringValue; if (reader....
Iaman Swtrse's user avatar
1 vote
0 answers
158 views

JavaScript's number can represent 18446744073709552000: > n = '18446744073709552000' > Number(n) 18446744073709552000 > String(Number(n)) === n true So I would expect BigInt(...
everett1992's user avatar
  • 2,710

15 30 50 per page
1
2 3 4 5
134