# Questions tagged [floating-point]

A method of representing numbers by a fixed number of significant digits, and the exponent of some base number. They are characterized in the form ${(significant digits)}*base^{exponent}$. Typically, numbers are represented with respect to base = 2 (binary).

154 questions
Filter by
Sorted by
Tagged with
1 vote
66 views

### Has the arithmetic for exotic (unsigned float with positive exponent) number format been solved?

The data type is a doubly unsigned float. This is where the value and exponent are both strictly positive. The range of this number should include $0$ and $[1, ~2^{\text{exponent}})$, skipping all ...
99 views

### The name of an exotic number format: float with exponent bits replaced with another float

What is the name of the numeric data type where a float has its exponent bits replaced with another floating point value to use as the outer float's exponent? This is a tip-of-the-tongue problem, as I ...
1 vote
100 views

### How to design a sin and an arcsin function such that arcsin(sin(x))=x, where x is a finite precision floating point number

As commonly known for programming on computer, if x is a finite precision floating-point number such as double/float in C language, arcsin(sin(x)) is usually not equal to x due to the numerical issue. ...
197 views

### Numerical accuracy of expression involving norm squared

I am computing the following quantity: $$\text{lhs} := ||a+b||^2 = ||a||^2 + 2a^\top b + ||b||^2 =: \text{rhs}$$ for $a=c-d$, where $a,b,c,d$ are $n$-vectors. Is there a rule of thumb for when I ...
92 views

### SVD testing non zero values

I was looking at the matlab function pinv.m for the compuation of the pseudoinverse. The code uses the singular values decomposition. $$A = U D V$$ When looking for non-zero diagonal elements it ...
65 views

### Dynamic tolerance in a conditional loop to obtain maximum precision allowed by machine floating point numbers

I have coded a simple program for a root finding problem using Halley's method. Here is the code: ...
136 views

226 views

### Augmented arithmetic operations (IEEE-754-2019): output definition and implementation

In the new version of IEEE-754-2019: IEEE Standard for floating-point arithmetic, the augmented arithmetic operations were introduced. These operations can be particularly useful in certain numerical ...
7k views

### Is half precision supported by modern architecture?

I am new to computer science and I was wondering whether half precision is supported by modern architecture in the same way as single or double precision is. I thought the 2008 revision of IEEE-754 ...
1 vote
40 views

### How is System.Decimal represented in memory bits?

I am trying to look at how different floating points are stored in memory. Firstly I looked at the System.Double (accessible by keyword ...
242 views

### Numerically stable and fast sum of last K elements in sequence

Suppose I have a long, possibly infinite, sequence $x := [x_1, x_2, ...]$, and I want to use it to compute another sequence $y:=[y_1, y_2, ...]$ where each element is the sum of the last K elements of ...
485 views

### log-sum-exp trick for signed/complex numbers

I need to evaluate a sum of values that are on many different orders of magnitude in scale but might be signed. I’ve had great luck with the “log-sum-exp” trick for an unsigned version of my problem, ...
610 views

### Numerical stability in the product of many matrices

I have to calculate in numpy the matrix-product of many matrices (~400). Are there common practices to increase numerical stability? If this is relevant, the matrices are $300\times 300$ orthogonal ...
111 views

### Is expm1 the right primitive?

I'm writing some code to calculate $\int_0^1 e^{ax} \mathrm{d} x$. Annoyingly there does not seem to be a way of doing this without if statements: ...
1 vote