# Tagged Questions

Mathematical questions concerning floating point numbers, a finite approximation of the real numbers used in computing.

39 views

### Solve the equation $\Bbb|x-\sqrt{x}|=\lfloor x\rfloor-\sqrt{x}$ [on hold]

$$\Bbb|x-\sqrt{x}|=\lfloor x\rfloor-\sqrt{x}$$ Do equation for positive numbers that are incorrect answer?I did not find them. $$With great wishes for you$$
24 views

### Relating to representation of real numbers. [on hold]

Can someone tell me which representation is better for representing real numbers: fixed point representation or floating point representation? If the answer is circumstance dependent, please specify ...
65 views

### Proving that $a\le \text{fl}\left(\frac{a+b}{2}\right)\le b$

Suppose that $a$ and $b$ are some floating point numbers such that $a\lt b$. How can I show that $$a\le \text{fl}\left(\frac{a+b}{2}\right)\le b$$ specifically in IEEE standard floating point ...
45 views

### For which arguments in the range $0\le x\le \pi/4$ will $\cos x=(1-\sin^2x)^{1/2}$ fail to give good accuracy?

The question is In floating point system, consider using the trigonometric identity $\sin^2x+\cos^2x=1$ to compute $\cos x=(1-\sin^2x)^{1/2}$. For which arguments in the range $0\le x\le \pi/4$ ...
49 views

### One wants to determine $1/(2+\sqrt 3)^4$ having access to an approximate value of $\sqrt 3$.

Can someone help me with this question please: One wants to determine $1/(2+\sqrt 3)^4$ having access to an approximate value of $\sqrt 3$. Compare the relative errors on direct computation and on ...
32 views

### Formal theory on floating point numbers?

Is there a formal theory involving the set of floating point numbers? Like topological properties, analytic properties, etc. There's no abstract theory involving floating point set? I usually find a ...
14 views

### Floating point binary to half precision floating point

I am trying to convert to $16$ bit half precision floating point however I ran into a possible error and am unsure if a negative exponent is ok. I am trying to convert $0010011100010000$ I separate ...
35 views

### Explaining error in a floating-point calculation

I'm working through a numerical analysis text and came across this question. The function $f_{1}(x,\delta) = \cos(x + \delta) - \cos(x)$ can be transformed into another form, $f_{2}(x,\delta)$, ...
23 views

### How do I perform Gram-Schmidt on floating point vectors with epsilons in them?

Let $\epsilon$ be a small positive number such that $1+\epsilon$ and $3+2\epsilon$ are machine numbers but $3+2\epsilon + \epsilon^{2}$ is computed to be $3 + 2\epsilon$. Now, let the (classical) ...
20 views

### Floating Point and machine error

Let $a$ and $b$ be to real arbitrary real numbers, show that the relative error that you made by computing $a^2b$ with floating point arithmethic is bound to $5\epsilon + O(\epsilon^2)$, with ...
212 views

### Plotting $\left(1+\frac{1}{x^n}\right)^{x^n}$.

When I plot the following function, the graph behaves strangely: $$f(x) = \left(1+\frac{1}{x^{16}}\right)^{x^{16}}$$ While $\lim_{x\to +\infty} f(x) = e$ the graph starts to fade at $x \approx 6$. ...
54 views

### Two expressions using three-digit floating point arithmetic with rounding?

What is the result of evaluating the following two expressions using three-digit floating point arithmetic with rounding? $(113. + -111.) + 7.51$ $113. + (-111. + 7.51)$ $9.51$ and $10.0$ ...
16 views

### How to bound the input parameters to a chaotic function to obtain exact result in a finite precision setting?

While I was reading the paper entitled (http://dx.doi.org/10.1109/ISCAS.2003.1204947) Kocarev, Ljupco, and Zarko Tasev. "Public-key encryption based on Chebyshev maps." Circuits and Systems, ...
34 views

### Floating point overflow. Can this power equation be simplified?

I’m running into trouble with the following formula that we’re using in our software. $$\frac{1 - x^{-y}}{1 - x^{-(y+1)}}$$ In certain cases, the value for $y$ is a relatively large number; ...
93 views

### Floating point modulus precision (high multiple)

While looking at implementing floating point modulus in double-precision on an x86 CPU, I found the FPREM instruction and proceeded to test the practical precision in some cases, one being ...
9 views

### What line-polygon clipping algorithm can I use to ensure that the resultant endpoints are always within the polygon?

I have a 2D plane, partitioned into n-sided, convex polygons. I'm using WRF's PNPOLY algorithm for polygon inclusion to ensure that a point belongs inside one and only one polygon. Is there an ...
49 views

### What is the largest floating point number a so that fl(100 + a) = 100?

What is the largest floating point number a so that fl(100 + a) = 100? Here is how float number is computed. $fl(a ⊙ b) = (a ⊙ b)(1 + δ)$. Where $|δ| ≤ ε$. Furthermore, $ε = 2^{-53}$. My ...
48 views

21 views

### Error accumulation

Assume that $a_j\leq u$ and $p_j\in\{-1,+1\}$ for $j=1,2,\ldots,n$ and that $nu<1$ where $u:=2^{-t-1}$. Show that following is true: $$\prod^{n}_{j=1}(1+a_j)^{p_j}=1+\theta_n$$ where ...
31 views

### Longest string whose $\log$ probability can be represented

The problem starts out with a binary string of length $n$, so the probability of any random string in the set is $\cfrac{1}{2^n}$. The smallest positive floating point value that the system can ...
34 views

### biased exponent vs unbiased exponent

Following IEEE-754, I am looking for an example that shows processing an unbiased floating point representation is harder than processing a biased one. All I see in the texts is that unbiased numbers ...
18 views

### Computing relative roundoff error of a correctly rounded binary number

This is related to a question that was asked and answered a moment ago. I need to answer the following: If $\displaystyle \frac{3}{5}$ is correctly rounded to the binary number ...
45 views

### Rounding up a binary number

I just converted the fraction $\frac{3}{5}$ to the following floating point binary number: $(1.001100110011001100110011\cdots)_{2}\times 2^{-1}$. Now, I am trying to find the two nearest machine ...
45 views

### Counting Iterations

How many multiplications are performed when the following code fragment is executed? Express your answers in terms of $n$, where $n \geq 10$. ...
32 views

### How are Floating Point approximations done by integer operations? (Source Wikipedia)

Please help me understand the mathematics involved in Wikipedia page of Floating point, section of Piecewise Linear approximation to exponential and logarithm. Following is the link Piecewise linear ...
58 views

### Floating point rounding

Having trouble proving these two statements are true if we assume no overflow occurs and all rounding modes(round down, round up, round to zero, round to nearest) are valid. 1) If x is non zero ...
30 views

### Stability of (floating point) computed variance

Homework Question from Accuracy and Stability of Numerical Algorithms, 2nd Edition, by Nicholas J. Higham, page 33: So every time we store an number and do a operation, we introduce an error bounded ...
61 views

### How do 24 significant bits give from 6 to 9 significant decimal digits?

was reading IEEE 754 single-precision binary floating-point format: binary32 when I ran into The IEEE 754 standard specifies a binary32 as having: Sign bit: 1 bit Exponent width: 8 bits ...
24 views

### standard notation to handle representation of a real number on a computer

Is there a standard notation to handle the effective representation of some real number $x$ on a finite machine ? I have in mind some kind of braces, but I am not sure it is appropriate. Let me try to ...
79 views

### Polynomial GCD in the presence of floating-point errors

The crucial requirement for using root isolation methods based on Vincent's theorem is that the input polynomial does not have multiple zeros. One way to remove the multiple zeros is to use polynomial ...
31 views

### How to Adequately Implement Phase I of Two-Phase Simplex Algorithm on a Computer with Floating Point Error

I'm currently trying to write some code that implements Phase I of the two-phase Simplex Algorithm described here: http://www.statslab.cam.ac.uk/~ff271/teaching/opt/notes/notes8.pdf In order to test ...
75 views

### Gosper Formula for inv $\pi$, properties.

I need to understand very good how the properties of this formula $\frac{4}{\pi} = \frac{5}{4} + \sum_{N \geq 1} \left[ 2^{-12N + 1} \times(42N + 5)\times {\binom {2N-1} {N}}^3 \right]$ Taken from ...
70 views

### What are examples of cases where floating-point $aaaa\ne(aa)(aa)$?

As explained in answers to this question on SO, due to non-associativity of floating-point arithmetic repeated multiplication like $aaaa$ can't be optimized to $(aa)(aa)$. Of course, aside from just ...
53 views

### error bound in function approximation algorithm

Suppose we have the set of floating point number with "m" bit mantissa and "e" bits for exponent. Suppose more over we want to approximate a function "f". From the theory we know that usually a ...
5 views

### Prove that a condition for a product fitting in a range holds

Given the sets $$L = \{x \in \mathbb Z : -2^{63} \le x < 2^{63} \}$$ $$F = \{m \cdot 2^e \in \mathbb R : m \in \mathbb Z, -2^{24} + 1 \le m \le 2^{24} - 1, e \in \mathbb Z\}$$ and ...
90 views

### How to understand or derive the formula $Mantissa$ $bits$ $/$ ${log_2}$ $10$ = $Decimal$ $digits$ $of$ $precision$?

I asked a question a couple days ago about floating point precision on stackoverflow called, "Is floating point precision mutable or invariant?" and I received the following response. The formula ...
131 views

### Curve Fitting to Represent Any Data

I'm a programmer seeking to take a bunch of data and represent it as a curve. Specifically, I want to take several hundred/thousand (floating) points and represent those points to a specified level of ...
261 views

### IEEE-754 Format Conversion

Represent 11.0011 x 2^10 using the IEEE-754 standard for 32-bit floating point representation. 0-Sign Bit 10001010-Exponent 1001100000000000000000-Mantissa Is this answer is correct ? I am bit ...
811 views

### why is $2.2250738585072014\text{e}{-308}$ not a number? [closed]

In programming the min value of a float is: $$2.2250738585072014\text{e}{-308}$$ but when I type this into a calculator, it says Not a Number. what I am wondering ...
55 views

### Can trigonometric functions for double precision be implemented in terms of those for single precision?

In some program environments like GLSL there is support for single and double precision numbers for arithmetic and square roots computation, but only single precision trigonometric functions are ...
86 views

### Name of function $(1+x)^n-1$

Is there any name for this formula $$(1+x)^n-1$$ When working with floating point numbers this can be calculated with much better precision for very small $|x|<1$ values using Taylor series ...
59 views

### Simplifying a decimal number under modular arithmetic – $9.9 \pmod{13}$

Can you please help me simplify the relation $9.9 \pmod{13}$? It may seem like a stupid question (!) but your answers will help me very much. Thank you.
21 views

### approximation using floating point arithmetic

Let $x=2.14366$ and $y=2.14363$ and $d=x-y.$ If $d*$ is the value of d computed using $5-$digit decimal floating point arithmetic, find the relative error. For this question I know how to calculate ...
160 views

### Floating point number,Mantissa,Exponent

In this computer, numbers are stored in 12-bits. We will also assume that for a floating point (real) number, 6 bits of these bits are reserved for the mantissa (or significand) with 2^(k-1)-1 as the ...
44 views

### Audio frequency increment yielding wrong results

I am writing something in the ChucK programming language, which is designed specifically for audio time functions (in this case, hertz). I'm having a really difficult time with a mathematical ...
82 views

### Why do I get a big relative error for my function? (Numerical Analisys - floating point)

When evaluating on the computer the following function: $$f(x)=\frac{x^2}{(\cos(\sin(x)))^2-1}$$ there is a big relative error for values $x\approx0$ (values very close to zero). I used the Taylor ...