The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
1answer
77 views

A good-enough version of good-enough? When should I stop iterating?

I am studying Abelson and Sussman's Structure and Interpretation of Computer Programs, 2/e. I solved the exercise 1.7, which asks for a better stopping criteria for an iterative function to calculate ...
1
vote
0answers
23 views

Conservation Law in Finite difference Scheme [closed]

I am using a Finite Difference scheme to solve a simple PDE in conserved form: $$\partial_t u = \partial_x (\partial_x u +au\partial_x u) = (1+a)\partial_x^2u +a(\partial_x u)^2 $$ $$\frac{u_n+1,j - ...
-3
votes
1answer
61 views

Determine machine epsilon

Consider a base 2 computer that stores floating point numbers using a 6 bit normalized mantissa (x.xxxxx), a 4 digit exponent and a sign for each. a) For this machine, what is machine epsilon? b) ...
1
vote
2answers
77 views

Gap between numbers in fixed-point vs. floating point arithmetic

If $r$ is a machine-representable number and $f(r)$ is the next larger machine representable number, are the following true or false? In fixed-point arithmetic, the distance between $r$ and $f(r)$ ...
10
votes
5answers
2k views

Is 2**x faster to compute than exp(x)?

Forgive the naïveté that will be obvious in the way I ask this question as well as the fact that I'm asking it. Mathematicians typically use $\exp$ as it's the simplest/nicest base in ...
2
votes
1answer
274 views

Numerical stability of C++: will a C++ program using a float or double library return the same arithmetical results on two different computers?

Say I am using boost or the built-in float or double mathematical libraries of my C++ compiler. I distribute the program. Will the execution of my C++ program on different machines given different ...
0
votes
1answer
45 views

How to logarithmic interpolation? [closed]

I'm trying to interpolate a logarithmic function but it always reaches a singularity due to $\log(0)$ being $-\infty$ is there a correct way to interpolate logarithmic functions? (as in correct ...
2
votes
0answers
54 views

0 error interpolation for discrete finite value points

I am working on an algorithm that requires me to interpolate a couple trillion positive discrete points with f(x) having low finite value (for example 0 - 5). It there a specialized algorithm specific ...
0
votes
1answer
44 views

Can someone interpret what this is asking for

I have this programming problem, but I really cant figure out what it wants me to do. Heres what it is: The cube root of a number can be found based on the observation that, if $t$ is an ...
4
votes
1answer
224 views

Is “ternary search” an appropriate term for the algorithm that optimizes a unimodal function on a real interval?

Suppose that I want to optimize a unimodal function defined on some real interval. I can use the well-known algorithm as described in Wikipedia under the name of ternary search. In case of the ...
0
votes
0answers
49 views

Numerically approximating an inverse integral transform?

My question is about numerical methods for inverting integral transforms; I'm trying to numerically invert the following integral transform: $$F(y) = \int_{0}^{\infty} y\exp{\left[-\frac{1}{2}(y^2 + ...
1
vote
0answers
75 views

Error accumulation in a numerical integration

I have this problem: Consider the problem of calculating the integral $$y_n =\int_{0}^{1} \dfrac{x^n}{x+10} \mathrm{d}x $$ for a positive integer $n$. Observe that $$y_n + 10y_{n-1} = ...
2
votes
0answers
101 views

Does Automatic Differentiation handle conditional branches, if yes how?

I'm trying to understand how Automatic Differentiation (AD) works. For simple algebraic operation, I get the chain rule thing. But, when the code contains conditional statement like ...
2
votes
1answer
100 views

What are the drawbacks of using an algorithm that is not backwards stable?

(This question might be legitimately crossposted to stackoverflow or mathoverflow or programming StackExchanges.) Preface I'm reading this paper on solving linear systems of equations ...
7
votes
2answers
86 views

numerical integral vs counting roots

I have a problem that can be viewed in two different ways: Compute an $n$-dimensional integral, numerical context. The domain of integration is an $n$-dimensional hyper-cube of side $L$. Count (just ...
13
votes
2answers
459 views

Computing inverse matrix when an element changes

Given an $n \times n$ matrix $\mathbf{A}$. Let the inverse matrix of $\mathbf{A}$ be $\mathbf{A}^{-1}$ (that is, $\mathbf{A}\mathbf{A}^{-1} = \mathbf{I}$). Assume that one element in $\mathbf{A}$ is ...
0
votes
2answers
204 views

Implications of truncation of numbers when converted into binary

I have been posed with a question whereby a computer truncates numbers to x number of digits. Due to this, if this computer is trying to store a decimal number which has a binary equivalent greater ...
0
votes
1answer
406 views

In a 32-bit floating number with normalized mantissa and excess-64 exponent base 16, the number $16^{-65}$ denotes

In a 32-bit floating number with normalized mantissa and excess-64 exponent base 16, the number $16^{-65}$ denotes Floating point overflow. Negative floating point overflow. All 0's in the exponent ...
7
votes
0answers
318 views

Alternatives to SVD for rank factorization

I have rank-deficient matrix $M \in \mathbb{R}^{n\times m}$ with $\text{rank}(M) = k$ and I want to find a rank factorization $M = PQ$ with $P \in \mathbb{R}^{n \times k}$ and $Q \in \mathbb{R}^{k ...
5
votes
0answers
391 views

Arc-Length parameterization of a cubic bezier curve

I like to implement an arc-length Parameterization of a cubic bezier curve. So far I have implemented the method of calculating the arc length of the curve and now I'm stuck at calculating the times ...
11
votes
1answer
249 views

Floating point rounding

Can an IEEE-754 floating point number < 1 (i.e. generated with a random number generator which generates a number >= 0.0 and < 1.0) ever be multiplied by some integer (in floating point form) to ...
1
vote
1answer
149 views

Which method for ODE instead of Euler's?

I need a super-fast method for ordinary differential equations. Should I use the midpoint method? I need this for a reaction-diffusion system (Gray-Scott).
3
votes
1answer
111 views

An argument for error accumulation during complex DFT

I am doing FFT-based multiplication of polynomials with integer coefficients (long integers, in fact). The coefficients have a maximum value of $BASE-1, \quad BASE \in \mathbb{n},\quad BASE > 1$. ...
4
votes
1answer
308 views

Fast Poisson quantile computation

I am seeking a fast algorithm to compute the following function, a quantile of the Poisson distribution: $$f(n, \lambda) = e^{-\lambda} \sum_{k=0}^{n} \frac{\lambda^k}{k!} $$ I can think of an ...
3
votes
0answers
280 views

Cyclic coordinate method: how does it differ from Hook & Jeeves and Rosenbrock?

I have trouble understanding the cyclic coordinate method. How does it differ with the Hook and Jeeves method and the Rosenbrock method? From a past exam text: Describe the cyclic coordinate ...
7
votes
2answers
268 views

Detecting overflow in summation

Suppose I am given an array of $n$ fixed width integers (i.e. they fit in a register of width $w$), $a_1, a_2, \dots a_n$. I want to compute the sum $S = a_1 + \ldots + a_n$ on a machine with 2's ...
10
votes
1answer
185 views

Overflow safe summation

Suppose I am given $n$ fixed width integers (i.e. they fit in a register of width $w$), $a_1, a_2, \dots a_n$ such that their sum $a_1 + a_2 + \dots + a_n = S$ also fits in a register of width $w$. ...