# Questions tagged [big-numbers]

Questions about or involving outside the range of normal machine precision, using Mathematica's capacity for arbitrary precision numbers and numbers outside the normal range of floating-point arithmetic.

55 questions
Filter by
Sorted by
Tagged with
632 views

### Can I use NextPrime[n] up to n=10^14?

I would like to perform computations with primes up to $n=10^{14}$. To do so, I would like to go through all primes, from $2$ to $10^{14}$ and perform some calculation on each prime. I saw that one ...
• 989
103 views

### How can I make sure that the two given numbers are exactly the same?

I have the given numbers $n1$ and $n2$. How can I make sure that these two numbers are exactly the same? Numerically, using {N[n1,40], N[n2,40]}, by increasing the ...
• 361
225 views

### Performance regression for big integer computation

Backslide introduced in 12.0, persisting through 13.1. Recently I noticed that the big integer calculation of the new version is much slower than the old version, can you reproduce, is there a way to ...
• 5,562
105 views

### Check certain expression using a while loop to run through all posibilities in a range

Well, I have written the following code (using the fast square root test found in this answer): ...
• 1,941
328 views

### Checking if a number is right sorted

I have a number $n$ such that the digits of $n$ are strictly increasing to the left except for the first digit. So for example when $n=51369$ fits the bill because: $$1<3<6<9\tag1$$ Is there ...
• 1,941
1k views

### Making the number 12345...n

Well, I am trying to write a code that makes the number: $$123456\dots n\tag1$$ So, when $n=10$ we get: $$12345678910$$ And when $n=15$ we get: $$123456789101112131415$$ And when $n=4$ we get: $$1234$$...
• 1,941
86 views

### Parallelization in While[] loop when testing if a condition is met

Well, I am trying to run the following code: ...
• 1,941
1 vote
110 views

### Implementing the Binary GCD algorithm in Mathematica

Well, I have $n\in\mathbb{N}$ and I want to transform $n$ to a binary number which can be done using FromDigits[IntegerDigits[n, 2]]. I want to compute the ...
• 1,941
263 views

### Why $\pi$ // Rationalize does not give a rational multiple of $\pi$ in my example?

As an obvious example of π Rationalize, I see that ...
• 1,159
86 views

### How to write this simple task of unimodular prime search in mathematica?

For testing a particular algorithm I found mathematica is the best way as it has all the tools I need. I am stuck in a number theory part and since I am not an expert in mathematica I do not know how ...
• 145
1 vote
67 views

### Filtering solutions in PowerRepresentations

I have the following code: PowersRepresentations[10400, 7, 2] This produces Length[PowersRepresentations[10400, 7, 2]]=433789 ...
• 1,941
97 views

### Help: Obtain a huge amount of data solved in FrobeniusSolve? (perhaps better without running FrobeniusSolve?) [closed]

How to obtain a huge amount of data solved in FrobeniusSolve more systematically? I am interested in obtaining these two sets of data from FrobeniusSolve: ...
• 903
1 vote
96 views

### Solving an equation in integers giving an error message

I've the following code: ...
• 1,941
1 vote
264 views

### Using more than 6 kernels in ParallelTable function [duplicate]

I have the following code: ParallelTable[ If[IntegerQ@Sqrt[80892036 + 17994 x (1 + x) (-5995 + 5998 x)], x, Nothing], {x, 6694300, 31072325}] It uses 6 ...
• 1,941
277 views

### Using Parallelize in a solve function

Is there a way to use Parallelize the following operation, in order to make it do the calculations faster? Or is there another way to speed up this calculation? ...
• 1,941
223 views

### Using the solve function for big numbers, getting a failure now

When I try to solve: Solve[y^2==441+48*x*(1+x)(-13+16*x)&&1100*10^9<=y<=1200*10^9&&x>=2,{y,x},Integers] My code runs for 169 seconds and ...
• 1,941
292 views

### How to get the bit size (bit length) of an integer? [closed]

Suppose I have the integer 255, so 11111111 is its base 2 (bit) representation and the bit size of 255 is 8. How can I calculate the bit size of a (big) integer in Mathematica? Is there a built in ...
118 views

1 vote
77 views

### Comparing large numbers [duplicate]

How can I compare really large numbers in Mathematica? I'm trying to compare: 2^4^4^4 < 4^4^4^4 It yields: ...
• 3,857
121 views

I'm using "mathlink.h" to call Mathematica from a C program. I send a computation to Mathematica and its return result is a very big number (100 digits). Hence, I want to read that number as a string. ...
• 415
679 views

### Strange behavior on very large numbers

I want to test the value of a differential equation by replacing a solution and setting random values for r and z variables: ...
• 1,911
444 views

### Can we compile using only Integers Of Unusual Size?

I coined Integers Of Unusual Size to mean "bignum" using GMP, the underpinning of Mathematica's ability to craft very big numbers. I have these functions from this question: ...
• 2,360
3k views

### How to compare power towers in Mathematica?

First I tried it directly, but it overflowed: ...