Questions tagged [computational-mathematics]

This tag concerns computational problems central to mathematical and scientific computing. The scope includes algorithms, numerical analysis, optimization, and linear algebra, computational topology, computational geometry, symbolic methods, and inverse problems.

Computational mathematics involves mathematical research in areas of science where computing plays a central and essential role, emphasizing algorithms, numerical methods, and symbolic methods. Subtopics include numerical linear algebra, numerical optimization, computational geometry, numerical PDEs and inverse problems.

Consider also posting your question at Computational Science Stack Exchange.

2003 questions
86
votes
3 answers

What algorithm is used by computers to calculate logarithms?

I would like to know how logarithms are calculated by computers. The GNU C library, for example, uses a call to the fyl2x() assembler instruction, which means that logarithms are calculated directly from the hardware. So the question is: what…
83
votes
8 answers

incremental computation of standard deviation

How can I compute the standard deviation in an incremental way (using the new value and the last computed mean and/or std deviation) ? for the non incremental way, I just do something…
71
votes
18 answers

Unsolved Problems due to Lack of Computational Power

I was recently reading up about computational power and its uses in maths particularly to find counterexamples to conjectures. I was wondering are there any current mathematical problems which we are unable to solve due to our lack of computational…
67
votes
8 answers

Is there a way to get trig functions without a calculator?

In school, we just started learning about trigonometry, and I was wondering: is there a way to find the sine, cosine, tangent, cosecant, secant, and cotangent of a single angle without using a calculator? Sometimes I don't feel right when I can't do…
65
votes
3 answers

Is "A New Kind of Science" a new kind of science?

A couple of years ago I was reading "New Kind of Science" (NKS) by S. Wolfram, and it presented lot of interesting ideas for a young Physics undergraduate. Now that I am studying Mathematics however, I realise that many ideas of NKS seem to be not…
62
votes
3 answers

What is the formula for pi used in the Python decimal library?

(Don't be alarmed by the title; this is a question about mathematics, not programming.) In the documentation for the decimal module in the Python Standard Library, an example is given for computing the digits of $\pi$ to a given precision: def…
39
votes
10 answers

Rapid approximation of $\tanh(x)$

This is kind of a signal processing/programming/mathematics crossover question. At the moment it seems more math-related to me, but if the moderators feel it belongs elsewhere please feel free to migrate it. I'm working on a project where I have…
31
votes
3 answers

Gauss-divergence theorem for volume integral of a gradient field

I need to make sure that the derivation in the book I am using is mathematically correct. The problem is about finding the volume integral of the gradient field. The author directly uses the Gauss-divergence theorem to relate the volume integral of…
30
votes
8 answers

Fastest Square Root Algorithm

(edit, 9 years later... hello smart contract developers, I know that's why you're here lol) What is the fastest algorithm for finding the square root of a number? I created one that can find the square root of "$987654321$" to $16$ decimal places in…
27
votes
5 answers

How could I improve this approximation?

In a computer application, I need to solve trillions of times an equation which can be reduced to $$f(x)=\sin(x)-a x=0$$ Newton methods (quadratic and higher orders) are used for the solution. Parameter $a$ is random and the solution $x$ looked for…
25
votes
7 answers

Calculating logs and fractional exponents by hand

In view of what we can compute by hand, on a piece of paper, without having to use a computer or a calculator, how far can we go with the evaluation of $\log$-functions and fractional powers? More concretely, are there practical methods, that work…
user929304
  • 1,564
23
votes
2 answers

Bitwise XOR of reciprocals of natural numbers

Out of curiosity, I am considering an interesting XOR "sum" of all reciprocals: $$X := 1 \oplus \frac{1}{2} \oplus \frac{1}{3} \oplus \frac{1}{4} \oplus \cdots= \bigoplus_{n=1}^{\infty} \frac{1}{n}$$ where $\oplus$ denotes bitwise XOR and all…
23
votes
2 answers

Efficient computation of $\sum_{k=1}^n \left\lfloor \frac{n}{k}\right\rfloor$

I realize that there is probably not a closed form, but is there an efficient way to calculate the following expression? $$\sum_{k=1}^n \left\lfloor \frac{n}{k}\right\rfloor$$ I've noticed $$\sum_{k=1}^n \left\lfloor \frac{n}{k}\right\rfloor =…
22
votes
1 answer

Computing (on a computer) the first few (non-trivial) zeros of the zeta function of a number field

If $K$ is a number field, whose Galois closure over the rationals has degree 24 or so, and whose discriminant is around $163^4$, then what is a numerically efficient way of computing the first few zeros of its zeta function on the critical line? I…
21
votes
1 answer

Product of primes mod n

Let $n$ be an odd composite number. I'm trying to compute $$ f(n)=\prod_{n/2
1
2 3
99 100