The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
22 views

Checking if the Hessian is the derivative of the gradient

Suppose f: R^n --> R. I have a code that computes the gradient of f. I have another code that computes the Hessian of f times a vector. Now I want to check if they are correct. Specifically, I am ...
0
votes
2answers
43 views

Find point in 3D plane

I have four points in a 3D space, example: $$(0,0,1),\ (1,0,1),\ (1,0,2)\ \mbox{and}\ (0,0,2).$$ Then I have a 2D position on that square plane: $$x = 0.5,\ y = 0.5.$$ I need to find out the 3D ...
2
votes
2answers
35 views

binary and floating point representation

suppose that we have following binary digits $00011001.110 $,we can do following thing $00011001.110=1\cdot2^4+1\cdot2^3+1\cdot2^0+1\cdot2^{-1}+1\cdot2^{-2}=25.75$ then what does means? We then ...
1
vote
1answer
22 views

Comparison between float point numbers

How can I demostrate that given two numbers A and B, if A <= B, then fl(A) <= fl(B). fl(A) is the float point representation of A. Which is equal to A(1+x), and |x| <= the machine epsilon ...
1
vote
1answer
73 views

Prove that in any base the number of digits composing the repetitive mantissa of the reciprocal of a prime $p$ never exceeds $p-1$.

I was trying to find bases where the reciprocals of primes have a short repetitive mantissa. Here is what I found: http://imagizer.imageshack.us/a/img835/7738/c7gb.png The bases are on the left. The ...
1
vote
1answer
35 views

Using rgb triplets in “scalar” math

So I'm reading a computer graphics research paper and I'm confused as to how to interpret certain formulas that are being used. In the paper, a value σ is defined as an RGB triplet. Later on, that ...
1
vote
2answers
42 views

How to compute the sine of a complex number in floating-point arithmetic?

What is the most efficient way to numerically compute the sine of a complex number? Suppose I want to calculate the sine of a complex number a + bi on a computer. Suppose that a and b are both ...
0
votes
1answer
66 views

Floating Point Number System

I really have no idea of how to do these questions - in fact I have no idea of how to do any question in the paper - but I have tried to figure out what's going on in the course called Computational ...
1
vote
0answers
23 views

Why is this number the smallest positive normalised binary value?

In the AQA A2 Computing textbook (Bond and Langfield, 2009), they say that this number is the smallest positive normalised value, given a 10 bit mantissa and a 6 bit exponent: ...
0
votes
0answers
23 views

Heuristics for sequence convergence

Having a finite sequence of double precision floating point numbers (obtained using the fixed point iteration of a function), is there any algorithm which can be used to determine that this sequence ...
0
votes
0answers
14 views

Identity for fractional summation

I would like to know if there's an identity to represent the following summation $\sum_{i=0}^{n}\frac{x_i}{y_i}$ Where x and y are non integer values. The result of this is being calculated using ...
1
vote
1answer
47 views

Max value - Mantissa calculation clarification?

I've been reading this article about floating point representation floating point representation is : Where mantissa is : All understood. But they also say : How did they get to ...
2
votes
1answer
22 views

How many bits of difference in a relative error?

I would like to know if there is a formula or any other way to find out how many bits of difference between two values given the relative error. For instance: $$\epsilon_{\text{rel}} = \frac{V - ...
1
vote
1answer
44 views

Math and Taxes - Items versus Sum Total differs

First, The question is a bit confusing as I am not really sure how to word this problem as a question. The math problem I encountered which is a bit of an anomaly is this : Suppose you are ...
2
votes
1answer
71 views

A general method to efficiently calculate the floor of an element of $\mathbb{Q}[\sqrt{2}]$

I had to decide whether to post this question here on the Mathematics Stack Exchange or on Stack Overflow, but I decided that the question was essentially a mathematical one despite being inspired by ...
0
votes
1answer
48 views

Converting base2 scientific notation to base10 scientific notation

I would now like to know how to convert a value in base2 scientific notation (is that the correct terminology?), say 1.93 * 2 ^ 88, into the form of A * 10 ^ B. I want to do this without expressing ...
0
votes
0answers
42 views

What is the result of the calculation: $8.375 - 0.375-0.875$?

Given the base $\beta=2$ (binary) and $t=4$ digits to represent the number in computer with hidden bit representation and symmetric rounding, what is the result of the calculation in floating point ...
0
votes
1answer
28 views

Range of number systems [closed]

I don't understand how to get the fraction part. This is what I came up with for the integer part. A) For 12 bit unsigned = 0 to 4095 B) For 12 bit signed = -2048 to 2047 C) For 12 bit in 2's ...
0
votes
1answer
34 views

What makes a floating point number finite?

We started studying about the binary floating point system, and talked mainly about the limitations when trying to represent fractions on computer systems, and how mostly what we get when manipulating ...
2
votes
2answers
31 views

Representing $-2.5$ as a floating point number

I am trying to understand the following: For example the number $-2.5 = -1*1.25*2^1$ is strored as: $S = 1$, Exponent $= 1+127 = 128$, Mantissa = $0.25 $ This got me. How do you connect all ...
0
votes
0answers
37 views

Biased form with hidden bit

A computer stores a number of 16 bits word using floating-point arrangement. Given that the first bit is reserved for the sign and followed by 6 bits for the exponent using biased form. The remaining ...
3
votes
1answer
77 views

Check if a point is on a plane? (Minimize the use of multiplications and divisions)

In $\mathbb R3$, given a plane $\mathcal P$ defined by three 3D points points $v_0, v_1, v_2$, I want to check if another point $p$ belongs to that plane, while avoiding the use of multiplications and ...
0
votes
1answer
45 views

Data Representation Question

A computer stores a number of $16$ bits word using floating-point arrangement. Given that the first bit is reserved for the sign and followed by $6$ bits for the exponent using biased form. The ...
1
vote
0answers
108 views

Division of large numbers

Euclidean Algorithm Versus Horner Algorithm. I have come across this problem and I do not manage to find a good example for it. For all the numbers I pick there is no loss. Give an example of a ...
1
vote
1answer
67 views

IEEE-754 64-bit representation of any number between -1 and +1 [closed]

In 64-bit IEEE 754 format, a 64-bit number is represented using 1 bit for the sign bit, 11 bits for the exponent width, and 52 bits for the fraction precision. How many bits is used to represent ...
1
vote
1answer
30 views

Problem in deriving distribution of the product of two floating point numbers

I'm studying the Hamming's article "On the Distribution of Numbers", but i'm confused in the way he obtain the (cumulative) distribution of the product of two floating point numbers. Maybe it's only ...
0
votes
2answers
48 views

How to compute the output of floating numbers? [closed]

Is it possible to "prove" that the following program outputs "1.73472e-17" ...
2
votes
1answer
66 views

Quadratic Root Equation Error

Suppose a machine with the floating-point system $\beta = 10$, $p = 8$, $L = -50$, and $U = 50$ is used to calculate the roots of a quadratic equation $ax^2 + bx + c = 0$, where $a$, $b$, and $c$ ...
0
votes
1answer
41 views

How to find the ratio of two numbers written in scientific notation, such as $ 2.69 \cdot 10^{-8} $ and $ 2.23 \cdot 10^{-7} $?

The numbers are forces and he wants us to put them in a ratio in order to compare them, but I'm really bad at ratios so. $ 2.69 \cdot 10^{-8} $ Newtons is obviously smaller than $ 2.23 \cdot 10^{-7} ...
0
votes
1answer
69 views

Backward stable algorithm

Assume we have fixed unitary matrices $Q_1, \dots, Q_k \in \mathbb{C}^{m,m}$ and a matrix $A \in \mathbb{C}^{m,n}$ which can be perturbed. How can we proof that the algorithm on computing the product ...
33
votes
4answers
4k views

Why does the google calculator give tan 90 degrees = 1.6331779e+16?

I typed in tan 90 degrees in google and it gave 1.6331779e+16. How did it come to this answer? Limits? Some magic?
1
vote
1answer
63 views

Need help for a beginner to floating-point arithmetic

I have this question that I need to complete and I literally have zero idea on what to do. I basically need someone to talk me through it and will appreciate all the help I can get. The question ...
2
votes
2answers
35 views

How to identify whether a fractional part of a number contains more that 2 digits.

EX. I want to accept numbers which have maximum of 2 digits after decimal points. i, e, 10.23 should be allowed and 10.233 should not be allowed. What mathematical operations can be done to ...
5
votes
2answers
82 views

Complex formula that is equivalent to $f(x) = x$

In a computer you can't store any real number that you want to because in the $[0.0;1.0]$ interval there are infinite numbers and computer memory is finite. I want to show it in examples, which is why ...
1
vote
2answers
100 views

Accurate computation of $\exp(a x^2) Q(x)$ for big values of $x$?

I was wondering how one can accurately compute the value of $\exp(a x^2) Q(b x)$ for large values of $$x \left(Q(x) \triangleq \frac{1}{\sqrt{2\pi}}\int_x^{\infty} e^{-\frac{u^2}{2}} du \right)?.$$ ...
3
votes
0answers
48 views

How quickly can one compare exp(m/n) to a given rational?

For positive integers $\hspace{.06 in}m_{\hspace{.02 in}0}\hspace{.02 in},n_0\hspace{.02 in},m_1,n_1\:$, $\;$ how difficult is it to decide whether $$\exp\left(\hspace{-0.03 in}\frac{m_{\hspace{.02 ...
0
votes
1answer
34 views

Multiplication of floating numbers to a modulus

As we all know, the integers follow the following identity : $$(A\cdot B\cdot C) \bmod M = ((A\cdot B) \bmod M\cdot C) \bmod M$$ But it does not work for real numbers having fractional part. For ...
0
votes
1answer
34 views

Accurate computation of KL divergence between binary RVs

I was wondering how one can compute the KL Divergence between two binary distributions (say, with parameters $p$ and $q$ and assume $p < \frac12$ and $q < \frac12$ for simplicity) accurately. ...
1
vote
1answer
54 views

Possible to convert from decimal in hexadecimal?

do there exist $d_i \in \{ 0,1,2,3,..15\}, p \in \mathbb N$ such that $$10^{-1}= d_1 16^{-1}+d_2 16^{-2}+...+d_p 16^{-p}?$$ my approach : $10^{-1}= (d_1 16^{p-1}+d_2 16^{p-2}+...+d_p)\cdot 16^{-p} ...
2
votes
1answer
74 views

property of sum in floating point arithmetic

define the set of floating point numbers by $F(2,53,-1022,1023)$. A Sum $(a+b)$ with $a,b \in F$ is said to be good if $(a+b)\in F$ otherwise it is a bad sum. I have to figure out if there are more ...
3
votes
2answers
159 views

Algebraic structure for the floating-point arithmetic.

Is it possible to consider floating-point arithmetic as some common algebraic structure? For example, consider something like simplified IEEE754 single precision binary floating-point subset of ...
2
votes
3answers
120 views

IEEE-754 General Issues

I read the documents of the IEEE-754 and I could not understand some things 1) Is it possible to represent any number using this method? I know there are a number of final states, and there are ...
1
vote
2answers
86 views

Decimal Floating Point to Shortest Binary

Might be more of a Comp Sci question so apologies if it's not appropriate. Basically I have a range bounded by two floating-point decimals <1. I need to find a short binary number lying between ...
1
vote
1answer
216 views

2D triangulation

I understood what it is from the following link: http://electronics.howstuffworks.com/gadgets/travel/gps1.htm But I want to know : In a 2D plane, if we know the (x, y) positions of three “guard” ...
2
votes
1answer
91 views

What Is The Gap Between 2 And the first IEEE number larger then 2

What is the gao between 2 and the first IEEE single format number larger than 2? What is the gap between 1024 and the first IEEE single format number larger than 1024 What is the differece between ...
0
votes
2answers
55 views

Does rationalizing the denominator lead to more or less round-off error?

I evaluated $\frac{1}{\sqrt{2}}$ and $\frac{\sqrt{2}}{2}$ in Matlab, and got a slight difference: $0.707106781186547$ and $0.707106781186548$, respectively. Which is more accurate, the one with the ...
3
votes
2answers
109 views

What exactly is a FLOP?

I know that is a "FLoating-point Operation" but,what exactly mean this!? Can anyone make me a mathematical example of a FLOP? For example, is $\sqrt{2}$ a FLOP?
1
vote
1answer
3k views

Moving point along the vector [closed]

I'm making a game. I have came across a problem. I have to move a point along a vector for some distance. Can anyone help me? Any ideas?
2
votes
4answers
532 views

Solving a quadratic equation with precision when using floating point variables

I know how to solve a basic quadratic equation with the formula $t_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ but I learned that if $b\approx\sqrt{b^2-4ac}$ floating point precision may give slightly ...
2
votes
1answer
832 views

How do you work with the IEEE 754 32-bit floating point format?

I'm having trouble completing a question that deals with the IEEE 754 32-bit floating point format, primarily because I don't know how to use it. I was hoping someone here could clarify for me using ...