Questions tagged [machine-precision]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
28 views

How to Calculate the Precision Required to Exactly Produce the Repeating Sequence of Digits in the Decimal Expansion of a Fraction

Say I am given a fraction $\frac{p}{q}$ and wish to express it as a decimal such that the repeating sequence of digits is accurately displayed at least once and preferably twice in the printed output. ...
0
votes
1answer
67 views

Error Propagation Using an Exponential Function.

Consider the programming problem of estimating the correct value of $2^{x}$, where $x$ is an irrational number entered with a precision of 500 binary bits. (1) How accurate (in terms of bits) is the ...
2
votes
0answers
17 views

Tough test polynomials for (finite precision) complex root finding methods, especially Aberth's method

Today I have implemented Aberth's method for complex polynomial root finding. And I have to say I am enchanted about its astonishing performance and its intriguing simplicity. Before I go on believing ...
0
votes
0answers
32 views

Floating-point rounding error in numerical differentiation formula

In Numerical Analysis by Timothy Sauer (Pearson, 2nd Edition) it says that $\tilde{f'}(x+h) = f(x+h) + \epsilon_{\text{mach}}$, where $\tilde{f'}(x)$ is the floating-point representation of the given ...
2
votes
0answers
31 views

Finding the real roots of a univariate polynomial on the interval [0,1]

I have numerous, univariate polynomials with degree in excess of 100 and with very, very large coefficients (Here's an example coefficient ...
2
votes
1answer
84 views

Calculator Confusion using Windows and Androids

I just came across this calculation, it's really confusing. I ran the following calculations in windows and android calculators. $1/98\cdot 98 = 1$ $1/98 = 0.0102040816326531$ $0.0102040816326531 * ...
0
votes
0answers
19 views

Algorithm to find minimum required decimals of precision for conversion between two precision systems.

I'm calculating an exchange from a cryptocurrency that allows up to 8 decimals of precision to normal USD which allows 2 decimals of precision. I need to display the amount of coins that a given USD ...
1
vote
0answers
26 views

computing standard deviation without mean produces illegal result! [closed]

I would like to compute STD in one-pass, without first computing the mean: Hence, I decided to use the following [formula][1]: std dev = sqrt [(B - A^2/N)/N] ...
0
votes
0answers
23 views

Rounding in IEEE double precision computer arithmetic

Wanted to check whether I executed this arithmetic expression correctly: $$(1 + (2^{-51} + 2^{-52} + 2{-53})) − 1$$ My process follows: $1.[00...00]\cdot 2^{0}+0.[0...010]\cdot 2^{0}+0.[0...001]\...
0
votes
0answers
43 views

Bounds on real numbers

Suppose that $\{\epsilon _1 , · · · , \epsilon_m \} $are real numbers that all satisfy $|\epsilon_i | ≤ \eta$. Show that given $C > 1$, we have that $$ \Pi_{j=1}^m(1+\epsilon_j) = 1 + \epsilon$$...
1
vote
0answers
151 views

How to prove the bound for Relative Round Off error

Machine precision is defined as the smallest machine number ε. Anything smaller when added to 1 will be lost at roundoff. Prove that ε is the bound for relative round-off error. ...
0
votes
0answers
241 views

How to prove fl(x^k) definition

How would I show that fl(x^k)= (x^k)(1 + δ)^(k−1), where |δ| ≤ ,ε if x is a floating-point machine number in a computer that has machine precision . Edit: I was thinking I can use induction to ...
0
votes
0answers
89 views

Machine epsilon

Good morning, i need some help understanding the definiton of the machine epsilon. My problem: I have a floating point number with 2 bits precision and a base of 2. If i use the standard formular i ...
1
vote
0answers
53 views

Numerical Analysis- Finding two closest machine numbers in single precision.

There is a question that is similar to this that was asked already, but the answer did not really make too much sense to me. Let's say I have a number 4096.000244 and I want to find the two closest ...
0
votes
0answers
154 views

SVD - near-zero singular value

I have difficulties to handle singular values close to zero. My SVD implementation $A = U \Sigma V {}^{T}$ performs first an Eigen decomposition of the matrix $A {}^{T} A$. That is done with the QR-...
1
vote
1answer
78 views

Intersection of three planes and precision of computing

I have a simple 3D object made of a triangle mesh. Here is a rendering of the mesh. I would like to make a 'coat' which is another mesh over the primary one, where all new faces have equal distance ...
4
votes
2answers
305 views

Numerically find cubic polynomial roots where coefficients widely vary in magnitude

Consider the following polynomial: $$ p(x) = x^3 + (C_b+K_a)x^2 - (C_aK_a + K_w)x - K_aK_w $$ Where: $x, C_a, C_b$ are concentrations, positive real numbers typically within $[10^{-7};1]$. The ...
0
votes
0answers
37 views

3 Circles acting as gears problem! what would be the Formula for calculating the 3rd (the driving) gears radius?

Radius of Circle A is R2 Radius of Circle B is R3 Radius of Circle C is R Distance between the center of Circle A & B is "X" Distance between the plane of the center of Circle A & B and the ...
2
votes
1answer
82 views

Verification: Machine number immediately to right and left of $2^m$

The question I'm given is what are the machine numbers immediately to the right and left of $2^m$? How far is each from $2^m$? I'm given the machine epsilon, $\epsilon$ is $2^{-23}$. (I believe we ...
1
vote
0answers
134 views

Convergence of Newton method and machine precision

I implemented the Newton method to find the non-zero root of $f(x) = 1-bx-e^{-x}$ in Excel and I have tested it for various values of $0<b<1$. However, what I am seeing for some values of $b$ (e....
1
vote
1answer
913 views

Machine Epsilon meaning

Say we have the floating-point system $(2,3,-1,2)$ and we want to find machine epsilon. According to my textbook, this can be found as $\epsilon_m=\beta^{1-t} = 2^{1-3}=0.25$. However, my textbook ...
1
vote
1answer
83 views

Numerically approximating limit with large numbers, bumping up against machine precision

Consider $\lim_{x\rightarrow\infty}(1+\frac1x)^{x}=e$. Using standard calculus techniques, this limit can be evaluated, however, approximating it directly with numerical code can be difficult ...
1
vote
1answer
47 views

When will A+(B+C) != (A+B)+ C, in a finite precision system

A, B, C, have finite precisions with machine epsilon of $10^{-16}$. When will the associative law A + (B+C) = (A+B) + C fail in this finite precision system? I have difficulty to find A, B and C. ...
0
votes
0answers
96 views

Subtracting a diagonal matrix from an ill-conditioned one

I've written Python 3 + NumPy code where I perform the following calculation: $$(B - \lambda I)^{-1}$$ where $B$ is a symmetric negative semidefinite matrix where some elements can be huge (greater ...
2
votes
1answer
103 views

Why are SDP solvers inherently inaccurate?

It's common to read in textbooks that semidefinite programming solvers are inherently inaccurate. Are the authors referring to the general machine inaccuracy (things like $10^{-16}=0$) or a ...
0
votes
1answer
34 views

Spreadsheet: Significant figures function [closed]

1 AU is 149597870700 meters. This is much more information than typically needed, so 150 million kilometers would be precise enough in most situations. Does spreadsheets have a function to handle ...
1
vote
1answer
107 views

Numerically stable way to calculate (a-b)/(c-d) where a~=b and c~=d

Is there a known general numerically-stable way to calculate $\frac{a-b}{c-d}$, where a is very close to b and c is very close to d, and all variables are stored as floating-point with some precision? ...
0
votes
1answer
93 views

Machine representation in fl(x) given x

Im having a debate between me and my study group regarding a question of numerical representation. $x = 0.002718281828459$, $\beta = 10$, $p = 6$ We are told to find $\text{fl}(x)$, $\beta$ is base ...
1
vote
2answers
55 views

Find expansion coefficients for non-integer rational base 'b' that minimize “$\epsilon$-closeness” to a root

For a non-integer rational base b, where b $\in$ (1,2), and the allowed expansion coefficients/symbols are $d_k$ $\in$ {-1,0,1}, it is known that b cannot be a root of the polynomial $\sum_{k=0}^n d_k ...
1
vote
0answers
27 views

Evaluating the error when using machine precision numbers

This question is related to this other. I have this function: $$f(n):=\sum_{k=1}^n\tan(k)$$ and Im evaluating it using machine precision numbers for each addend (my knowledge about how computers ...
1
vote
1answer
258 views

Accurate computation of square of complex values in Matlab: abs(X).^2 or X.*conj(X)?

I have found that in a dataset I am using I get different results depending on how I tell Matlab to compute the power. If I submit the command Xpow=abs(X).^2; vs. <...
1
vote
0answers
50 views

Does a certain mathematical property holds for floating point numbers?

Definitions Let $\mathbb{F}$ be the set of floating point numbers in a given format, which could be either IEEE-754 binary32 (single precision) or binary64 (double precision). Let $m(Z)$ the ...
2
votes
2answers
71 views

Computation in R

I am trying to find the following expression for $n=50, m=40$ in the software R. \begin{equation} m \binom{n}{m} \sum_{i=0}^{m-1}\frac{ \binom{m-1}{i}(-1)^i }{n-m+1+i} \end{equation} Ideally this ...
4
votes
2answers
203 views

How many digits of accuracy will an answer have?

I was doing a project Euler problem where I needed to find several Fibonacci numbers, but their index was so large that I could not use the typical recursive method. Instead, I used Binet's rule: $$ ...
2
votes
1answer
121 views

Floating point numbers, real numbers and machine precision

My math-book states that when a real number $x$ is replaced by a floating-point number $F(x)$ then the error between the two is: $|error|=|x-F(x)|\le\epsilon |x|$ Now the book asks: Consider two ...
1
vote
1answer
123 views

Solving strict inequalities with integer maths accounting for rounding errors

I have an array of floating point numbers $X_i$ of type T, where T could be either float or double. These numbers are strictly ...
0
votes
1answer
738 views

How to Calculate Mean Cross Entropy for Accuracy

I have 2 arrays of size N. X= array of predicted probabilities Y= observed probabilities This can be interpreted as X[i] = the predicted probability of the event occurring on trial i....
0
votes
1answer
411 views

Question on benign and catastrophic cancellations

I am studying theorem 4 in this article (its proof is under theorem 13). From what I have learned, the theorem is helpful when $x$ is small but $1 \oplus x \neq 1$. At the end of theorem 4, it ...
1
vote
1answer
200 views

Rounding error of $\ln(1 + x)$

I am struggling to understand the theorem 4 in this article. From what I understood, the theorem indicates that since we lost precision in calculating $\ln(x+1)$ for small $x$, a more accurate way to ...
1
vote
1answer
281 views

Relative error of machine summation

Let $\mathbb{F}(b,t,L,U)$ (briefly $\mathbb{F}$) the set of all machine numbers. The definition is the usual, i.e. $\mathbb{F}$ is defined as \begin{equation*} \mathbb{F} := \left\lbrace (-1)^{s} m ...
0
votes
1answer
144 views

calculating exponential function with high precision.

How can I calculate $e^{-x}$ with 128 bit precision. I am using c on a machine of 32 bit wordsize. Thank you.
1
vote
0answers
89 views

What is the best method to compute the eigenvalues of a large non-symmetric matrix?

I have a square matrix with the dimension of $1600\times1600$. I need to compute the eigenvalues of this matrix and investigate its observability. The usual way is to compute the eigenvalues of this ...
0
votes
2answers
208 views

Does the rounding unit of a floating point system depend only on the mantissa?

The rounding unit (or machine epsilon) of a binary floating point system is usually represented as $\frac{2^{-(p - 1)}}{2}$ or simply $2^{-(p - 1)}$, according to this Wikepedia's article (if I'm not ...
2
votes
1answer
1k views

Rounding unit vs Machine precision

I'm not sure if this question should be asked here... For a general floating point system defined using the tuple $(\beta, t, L, U)$, where $\beta$ is the base, $t$ is the number of bits in the ...