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

learn more… | top users | synonyms

1
vote
2answers
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$$
1
vote
0answers
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 ...
0
votes
2answers
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 ...
0
votes
1answer
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$ ...
0
votes
1answer
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 ...
3
votes
1answer
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 ...
0
votes
0answers
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 ...
2
votes
1answer
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)$, ...
0
votes
1answer
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) ...
0
votes
1answer
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 ...
15
votes
3answers
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$. ...
1
vote
1answer
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$ ...
1
vote
0answers
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, ...
1
vote
3answers
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; ...
1
vote
2answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
1
vote
0answers
48 views

If $0.2349$ is approximated to $0.2299$, what is number of significant figures in such approximation?

If $0.2349$ is approximated to $0.2299$, what is number of significant figures in such approximation? Let $x_T=0.2349$, $x_A=0.2299$, then absolute error = $|x_T-x_A|=0.0050=\frac{1}{2}\times ...
0
votes
0answers
44 views

floating point subtraction for binary numbers

Consider that I want to do a binary operation on the following floating point numbers: 0.35-0.62 I can reach the end but I can not figure out how the sign bit is ...
0
votes
1answer
45 views

Finding the mantissa from binary with floating point numbers?

Here is the example problem slide I am working with: I understand how to get the exponent, its just 2+128=130-127=3 I understand the first bit is the sign bit for positive or negative. I just ...
0
votes
0answers
15 views

Fixed point exponent faithfull rounding? does it make any sense?

i've a stupid question that just come up in my mind. Let's say we have a floating point number $x = (-1)^{s_x} 2^{e_x} 1.m_x$, let's say for some reason we need to divide the exponent by $2$, maybe ...
0
votes
1answer
13 views

Computer arithmetic - size of error.

I'm actually reading What Every Computer Scientist Should Know About Floating-Points Arithmetics and I have a little problem with understaing one thing. Here's a quote: Write $(b \otimes b) ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
2answers
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$. ...
2
votes
0answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
1answer
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 ...
4
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
5
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
2
votes
1answer
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 ...
0
votes
2answers
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 ...
1
vote
1answer
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 ...
11
votes
4answers
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 ...
2
votes
0answers
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 ...
2
votes
1answer
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 ...
0
votes
2answers
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.
0
votes
1answer
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 ...
0
votes
1answer
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 ...
2
votes
1answer
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 ...
2
votes
3answers
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 ...