The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
56 views

Divide and Conquer division algorithm explained (as used in GMP bignum)

I am trying to understand the divide and conquer division algorithm that is used in the GMP bignum arithmetic library. The code is very optimised and that makes it somewhat hard to understand. the ...
2
votes
0answers
71 views

How to construct a subring of a polynomial ring in Magma

This is a question about the computer algebra system Magma. I have been looking for a place to ask this type of question on the SE network and scicomp.SE was suggested to me; hopefully it finds a home ...
2
votes
1answer
65 views

How can I avoid roundoff error when calculating the difference $\textrm{erfc}(a) - \textrm{erfc}(b)$?

In this excellent answer, it is recommended that one make use of the $\textrm{erfcx}$ function to avoid roundoff error in calculating dealing with $x < 25$ (approximately). So, one scales their ...
5
votes
1answer
43 views

How would I figure out when a function would be at the “brink of underflow”?

User hardmath, provided an excellent overview of how to handle overflow when calculating the product of two functions, where one is likely to overflow: http://scicomp.stackexchange.com/a/20913/9466 ...
2
votes
2answers
231 views

what does -ffast-math do?

What kind of optimisations does the option -ffast-math do ? I saw that the time taken for a simple $O(n^2)$ algorithm being reduced to that of an $O(n)$ algorithm ...
1
vote
2answers
100 views

performance of icc main.cpp == g++ -ffast-math main.cpp

I have a program that has a nested loop, together with its parent running at $O(n^2)$ complexity performing floating point arithmetic. I see that the performance of the code when compiled with ...
2
votes
3answers
173 views

Exact analytical matrix inversion of sparse 100x100 matrices in C++

I need to invert a matrix. Of course, I'm not the first person in this situation, and I know that there's a wealth of powerful libraries out there, of which I only know a couple. That being said, ...
3
votes
1answer
129 views

Compute hypergeometric function ratio: $\frac{_{2}F_{1}(a+1,b;c;x)}{_{2}F_{1}(a,b;c;x)}$?

I need a numerically stable way to compute the following ratio: $$\frac{_{2}F_{1}(a+1,b;c;x)}{_{2}F_{1}(a,b;c;x)}$$ All the parameters are real numbers, with $a< 0$,$\ $ $b,c > 0$ and ...
0
votes
1answer
59 views

How many years it would take our laptops to be as fast as the fastest super computer in 2000 [closed]

How many years it would take our laptops to be as fast as the fastest super computer in 2000 according to Moore's law?
3
votes
1answer
120 views

Fibonacci, variation on the theme

I am trying to calculate the numbers $n$ for which the $n$-th Fibonacci number $F_n$ is a multiple of $n$; that is fib(n)%n==0. Here is the best PARI code I could come up with (for the counting ...
2
votes
1answer
1k views

range of positive mantissa in given floating-point number representation

I am a student and I came to this question while solving problems regarding the float-points. ...
5
votes
2answers
110 views

How many bits to unambiguously represent fixed-point division?

Suppose I have a function which divides an $m$-bit unsigned integer $a$ by an $n$-bit unsigned integer $b$ and returns the quotient as a fixed-point number with $t$ fractional bits, truncating towards ...
2
votes
2answers
95 views

Integer arithmetic support on future HPC systems

I writing some robust geometric algorithms using quantization + integer arithmetic for evaluating exact predicates. However, since BlueGene's integer support is so terrible, it occurred to me that ...
4
votes
2answers
867 views

Need for quad precision in scientific computing?

Even if quad precision is not directly supported by most CPUs, many Compilers (GNU, Intel) support them. Also some software packages allow to compile with quad precision, e.g. PETSc. But is there ...
4
votes
2answers
157 views

Krylov subspace iterative methods in floating point arithmetic

Is there any work that considers Krylov subspace iterative methods in floating point arithmetic? I'm especially interested in how rounding errors influence the convergence and the accuracy of the ...
13
votes
4answers
347 views

In floating point arithmetic, why does numerical imprecision result from adding a small term to a difference of large terms?

I have been reading the book Computer Simulation of Liquids by Allen and Tildesley. Starting on page 71, the authors discuss the various algorithms that are used to integrate Newton's equations of ...
8
votes
3answers
333 views

Which is computed faster, $a^b$, $\log_a c$ or $\sqrt[b]{c}$?

Which is computed faster, $a^b$ or $\log_a c$ or $\sqrt[b]{c}$? $a$, $b$ and $c$ are positive reals with $b>1$. What kinds of algorithms will you use in the comparison? What are their ...
35
votes
2answers
3k views

Why is division so much more complex than other arithmetic operations?

I recently encountered a case where I needed an integer division operation on a chip that lacked one (ARM Cortex-A8). While trying to research why that must be, I found out that in general division ...