Questions tagged [ieee754]

6 questions
5
votes
2 answers

Big Transition of Binary Counting in perspective of IEEE754 floating point

If I iterate over binary representations from 000...000 to 111...111, is there a significant transition at some point? In the IEEE 754 float32 format, the position of the bits matters, where the most significant bit (MSB) is the sign bit: sign (1) |…
2
votes
1 answer

Does adding two positive IEEE-754 floating point numbers ever result in a smaller number?

When dealing with floating point numbers, is there every a time when adding two non-negative, finite, non-NaN numbers will result in a result that is less than the greater of the two? $x + y < max(x, y)$. My gut feeling is no, but I know floating…
Captain Man
  • 123
  • 5
2
votes
1 answer

Is there such data type for low range float?

For integers, we have unsigned integers to represent positive integers, including zero, and we have signed integers to represent negative and positive. There are always trade-offs between them. For example, an 8-bit unsigned integer has a range…
1
vote
2 answers

How to correct IEEE floating point drift in rolling geometric mean

The geometric mean for some width $w$ is the $w$-th root of the product of the $w$ most recent data points. $$ M_t = \sqrt[w]{x_t \otimes x_{t-1} \otimes \cdots \otimes x_{t-(w-1)} } $$ This can be calculated in a rolling fashion by dividing out…
CAD97
  • 113
  • 4
1
vote
4 answers

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 are significant. What I don't understand is why there are any additional decimal places after, say, the 16th. Where do these…
0
votes
0 answers

What is the purpose of rounding bit in floating point numbers?

Let's only consider single precision ieee-754 floating point numbers. I understand how to convert decimal floating-point number to its ieee-754 representation (Well... almost). My problem is with rounding step. I've heard about guard, rounding, and…