The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

Filter by
Sorted by
Tagged with
56
votes
2answers
5k views

What is so special about Prime?

When we try to evaluate Prime on big numbers (e.g. 10^13) we encounter the following issue: ...
21
votes
1answer
787 views

Faster binary Hamming weight for big integers?

While working on an answer to Count the sequences in an array I found that DigitCount was the bottleneck in my code when used as ...
41
votes
1answer
2k views

How to compare power towers in Mathematica?

First I tried it directly, but it overflowed: ...
1
vote
1answer
252 views

How to solve equations in Gaussian integers modulo p

How to solve a complex equation of the form: $$z^n \equiv i \pmod p$$ where $z$ is a Gaussian integer, $i$ is the imaginary number, $n, p \in \mathbb{Z}^+$ and $p$ is prime. I am dealing with quite ...
23
votes
7answers
7k views

How to express an integer number in English words?

How do I convert a number to a readable string? I would like to implement a function, inWords[], inWords[n_]:= ? which ...
4
votes
2answers
594 views

Fast Trial Division

I'm going to write a custom Trial Division primality test. I know that PrimeQ will first try trial division and then switches to ...
4
votes
2answers
401 views

What is the most efficient way to add zeros to end of a number?

Beside *10^n, is there a faster way to add thousands of zeros to end of a number? Updated Timings: ...