# Tag Info

Accepted

### Inequality caused by float inaccuracy

In typical floating point implementations, the result of a single operation is produced as if the operation was performed with infinite precision, and then rounded to the nearest floating-point number....
• 31.5k

### Why do computers use binary numbers in IEEE754 fraction instead of BCD or DPD?

the binary representation is the most efficient. BCD wastes 17% of the bits. binary arithmetic is the simplest to implement in hardware. "the smallest difference between numbers is $0.015625$, ...
• 331
Accepted

### Big Transition of Binary Counting in perspective of IEEE754 floating point

Incrementing 011111110111...111 to 011111111000...000 changes the float32 value from $\approx3{.}4\times10^{38}$ to +infinity, which is an infinite difference. Likewise with negative sign. (There are ...
• 1,696

### Why do computers use binary numbers in IEEE754 fraction instead of BCD or DPD?

Quite simply, your assertion that BCD gives more precision is wrong. For example, 20 bits = 5 BCD numbers = 5 digits, while 20 binary digits = 0 to 1,048,575 = more than 6 digits. BCD is very ...
• 31.5k

### Is significand same as mantissa in IEEE754?

They're used as synonyms in the context of floating point math, but "mantissa" is less correct mathematically. It's fewer syllables, easier to type, and starts with a different letter than ...
• 1,065

### Understanding denormalized numbers in floating point representation

Although, the question is a bit old, but it may help people coming here for similar question. A vital detail was missed out in the article that you referred to and it is that the standard chose to ...
• 191

### Big Transition of Binary Counting in perspective of IEEE754 floating point

For all of the "normal" finite floating point numbers (those between 1.18*10^-38 and 3.40*10^38, or between -1.18*10^-38 and -3.40*10^38, for IEEE-754 binary32 floats), the behavior is very ...
• 429
Accepted

### Number of FLOPs (floating point operations) for exponentiation

Assuming multiplication between two numbers use one FLOP, the number of operations for $x^n$ will be $n-1$. However, is there a faster way to do this ... There most certainly is a faster way to do ...
• 225
Accepted

### Is significand same as mantissa in IEEE754?

In base 2, the significand is a number of the form $1.b_1b_2\ldots$ where the $b_i$'s are base 2 digits. The mantissa is the digits $b_1b_2\ldots$. More generally, in base $n$, the normalized ...

### Why do computers use binary numbers in IEEE754 fraction instead of BCD or DPD?

Why would anyone want to use decimal? The other answers have explained the many advantages of binary over decimal floating point. But what are the possible advantages of decimal over binary? There is ...
• 1,696
Accepted

### Floating point arithmetic

Firstly, you need to decide if the floating point numbers you are working with are "normalized" or not. Think about how binary numbers are represented in scientific notation. Consider the number <...
Accepted

### Simple algorithm for IEEE-754 division on 8-bit CPU?

When using properly-rounded higher-precision floating-point arithmetic to compute operations in lower-precision arithmetic, there is the potential issue of double rounding: The result is first rounded ...
• 530

### Why do floating point values have infinity?

Because sometimes there just isn't an exponent high enough. First of all, there is no way to effectively represent all real numbers in a reasonable computational model: it is sufficient to observe ...
• 4,272
Accepted

### Imaginary numbers and negative zero

Yes, there is a usage for the negative imaginary zero. But first, I will say something about the negative zero in general. Why have a negative zero? First of all, the main reason to have a signed ...
• 8,322
Accepted

### How does computer store non-repeating decimal very accurately?

It may be that sqr (sqrt (7)) is displayed as 7, but it isn't actually exactly equal to 7. That's something you need to check. What you see is not always what you get. It may be that sqr (sqrt (7)) is ...
• 31.5k

### Number of FLOPs (floating point operations) for exponentiation

Using n-1 multiplications would be rather daft. For example, if n = 1024, you just square x ten times. Worst case is 2 * log_2 (n). You can look up Donald Knuth, Art of Computer Programming, for some ...
• 31.5k
Accepted

### numerically stable log1pexp calculation

Let $0 < \varepsilon \lll 1$ be the relative error bound of the floating-point system—$2^{-53}$ in IEEE 754 binary64 arithmetic. First, the naive formula ...

• 278k

### Why floating point representation uses a sign bit instead of 2's complement to indicate negative numbers

IEEE 754 uses sign/magnitude, not two's complement or one's complement. Two's complement has the disadvantage that the positive and negative range are not identical. If all bit patterns are valid, ...
• 31.5k

### Floating Point Systems - Rounding Error in Taylor series

Yes, that's exactly why: it's due to floating-point roundoff error, due to the alternating signs. Suppose you have $x=10^{100}$ and $y=10^{100}-1$, and you ask your computer to subtract $x-y$. We ...
• 164k
Accepted

### What factors influence machine epsilon?

The phrase "machine epsilon" is misleading. In reality, it doesn't depend on the machine at all, but on the floating-point data types that the programmer chooses to use.
• 82.1k
Accepted

### Comparing floating-point numbers as integers

There are a few fine tricks in the IEEE P754 format, which allows the use of integer operations for comparisons, or for rounding... It is useful for hardware implementations, for CPUs without an FPU, ...
• 1,870
Accepted

### Is the exponent in floating point numbers signed or unsigned

This is mostly a matter of interpretation. For IEEE 754 floating point numbers (one of the most common implementations), an exponent bias is used: In IEEE 754 floating point numbers, the exponent ...
• 325
Accepted

### Are IEEE floating point numbers intervals or point values?

That has been long established. Most IEEE 754 floating point numbers represent exactly one real number. The exceptions are +0 and -0, +Inf and -Inf, and NaN with special meanings. (Thanks for one ...
• 31.5k