# Questions tagged [floating-point]

Approximate representation of numbers as a fixed number of digits multiplied by a logarithmic scale.

186 questions
Filter by
Sorted by
Tagged with
46 views

### Cancellation of inequalities in floating point arithmetic

In finite precision floating point arithmetic the associative property of addition is not satisfied. This is, it is not always the case that $$(a+b)+c=a+(b+c)$$ Even $a=(a+b)-b$ is not always true. To ...
13 views

### Why do many floating point numbers appear compact in base16 and base32 representation? (IEEE 754)

Consider 3 randomly chosen floating point values and their base conversions: ...
21 views

### How does value decompression work for Facebook's Gorilla in the case where count of leading zeroes is not stored

I am referring to this paper: http://www.vldb.org/pvldb/vol8/p1816-teller.pdf My question is regarding section 4.1.2 where it says: When XOR is non-zero, calculate the number of leading and ...
10 views

### Help comparing relative error for different parenthesizations of addition

I am given two functions: $fl(fl(x+y)+z)$ and $fl(x+fl(y+z))$ and asked to derive their relative error. Then, given a set of conditions: a) $x < y < x$ b) $x > 0, y < 0, z > 0$...
23 views

### Floating point binary number to a 7 segment decimal display

I have covered floating point (32 bit) conversion from float to decimal and decimal to float. I am happy with the theory and I have created a conversion tool in Excel VBA which works just fine ...
32 views

### What is the 2's complement answer of 16.5?

According to this post it is saying Two's complement is only for integers, but in Wolframalpha is is saying the Two's complement of 16.5 is 0010000.1, how?
247 views

### fast and stable x * tanh(log1pexp(x)) computation

$$f(x) = x \tanh(\log(1 + e^x))$$ The function (mish activation) can be easily implemented using a stable log1pexp without any significant loss of precision. Unfortunately, this is computationally ...
45 views

### Converting a number to 16-bit Floating Point Format

I want to convert the number -29.375 to IEEE 745 16-bit floating point format. Here is my solution: The format of the floating point number is: 1 sign bit unbiased exponent in 4 bits plus a ...
45 views

### Numerical Accuracy & Sorting Algorithms?

Sedgewick and Wayne talk about how sorting algorithms and, specifically, priority queues are used in devising ways to improve accuracy in floating-point calculations: https://algs4.cs.princeton.edu/...
166 views

### Write the smallest positive number that can be represented by the floating point system

Using a normalised floating point representation box with an 8-bit mantissa and a 4-bit exponent, both stored using two’s complement. (a) Write the smallest positive number that can be represented by ...
37 views

### Is the exponent bias $2^{n-1}-1$ or $2^{n-1}$

I'm a bit confused with the exponent bias. The sources I found online claim that it is either $2^{n-1}-1$ or $2^{n-1}$, $n$ is the number of bits used for the exponent. In my book when given examples ...
39 views

### Understanding How Double Precision Numbers are Stored in a Computer

I am reading Numerical Analysis by Walter Gautschi. I am somewhat confused by the following quote from page $5$: To increase the precision, one can use two machine registers to represent a machine ...
38 views

49 views

### How does IEEE 754 decimal encoding work? [closed]

This may be a silly question, but if a computer works in binary how can you encript numbers using decimal?