Questions tagged [numerical-analysis]
The numerical-analysis tag has no summary.
99 questions
0 votes
1 answer
40 views
Whats the maximum decimal number that can be represented in binary if there are 2 significant digits?
I'm looking to store money as Double, and I feel this should be safe because Im not doing any operations on it. just storing. But I am wondering whats the biggest number that can be stored before the ...
3 votes
0 answers
91 views
Understanding the proof of a Theorem in Knuth's TAOCP about floating-point addition and subtraction
This is about the proof of Theorem A on pg. 235 of Knuth's "The Art of Computer Programming" Vol. 2, 3rd Ed. Background: By "normalized floating point number" Knuth means a number ...
2 votes
0 answers
31 views
Finding orders in raw Echelle spectrum frame
Being new in this forum, would like to get some hints for solving the following problem. In the attached frame the short vertical line segments are emission lines. As can be clearly seen, these lines ...
1 vote
4 answers
218 views
Where do extra digits come from in floating point numbers?
In GNU Octave, num2str(pi,"%.20f") prints 3.14159265358979311600. I understand that only the first 15 decimal places ...
7 votes
2 answers
3k views
Numerical methods: why doesn't this python code return 1.0?
I typed the following into the python console: ...
0 votes
2 answers
144 views
Linear time approximate multiplication
I was searching for the following simple thing, but to my surprise couldn't find anything online. Is there a linear time approximation algorithm for multiplication or for division. Meaning, Given I=$[...
1 vote
0 answers
42 views
How Does the ELM Method Approximate Solutions to Linear ODEs Without Direct Training Data?
How Does the ELM Method Approximate Solutions to Linear ODEs Without Direct Training Data? Summary of the Problem I am working on solving a linear inhomogeneous ordinary differential equation (...
1 vote
0 answers
30 views
Determining when to switch to a numerically stable asymptotic algorithm
I am trying to evaluate the probability density function for the Variance-gamma distribution which is $$f(x) \propto |x|^{\lambda - \frac{1}{2}}K_{\lambda - \frac{1}{2}}\left(\alpha|x|\right)e^{\beta|...
2 votes
1 answer
184 views
Computing an initial ellipsoid for solving a convex program
Suppose we want to find a vector $x\in R^n$ that satisfies the constraints $g_i(x)\leq 0$, for $i\in 1,\ldots, m$, where all $g_i$ are convex functions. The functions can be given by an oracle access: ...
2 votes
0 answers
74 views
Best way to constrain a complex number to being within the unit circle?
What is the best way of implementing the following function, $$f(x) = \frac{x}{\max(1, |x|)},$$ where $x$ is complex, using a Cartesian representation of $x$ with IEEE 754 floating point ...
1 vote
1 answer
226 views
Algorithm to calculate lower incomplete gamma function
I'm trying to understand the implementation of the algoritm here. Please see GammaLowerRegularized(a, x) function. I understand 1st part of the function for ...
1 vote
1 answer
252 views
What does it mean unambiguously that a number is value 0 up to numerical precision?
I was reading that a quantity $x$ is $0$ upt to numerical precision. What does this statement formally mean -- especially in the context of numerical methods or real computers. I looked up in google ...
0 votes
2 answers
141 views
(Numerical Analysis) What is the largest double float represented for the gamma function and $n!$
Consider that \begin{align} \Gamma(n+1) = n! \end{align} for any integers. I then got the following two questions: What is the largest value of $n$ for which $Γ(n+1)$ and $n!$ can be exactly ...
4 votes
2 answers
399 views
Precise algorithm for finding higher order derivatives
I'm trying to make an algorithm that finds the first 10 or so terms of a function's Taylor series, which requires finding the nth derivative of the function for the nth term. It's easy to implement ...
1 vote
0 answers
90 views
Finding points of local maximum error in Remez algorithm
So the Remez algorithm is an algorithm for finding optimal polynomial approximations or at the very least for converging towards them. To find an approximation of $f$ by an $N$th degree polynomial the ...