# 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).

132 questions
Filter by
Sorted by
Tagged with
161 views

### Automatic finite differences

Given numbers $x, y \in \mathbb{R}$ where $$\frac{|y-x|}{|x|}$$ is small, and code that implements the function $f$ with a sequence of arithmetic operations, I would like to compute to high accuracy ...
78 views

### Unstable Algorithms which become stable when hardware provides Kulisch exact dot product instruction

In John Gustaffson's book The End of Error, he discusses Ulrich Kulisch's exact dot product, which (in double precision) requires a 2100 bit fixed point register which rounds only once after the ...
3k views

### Why are log and exp considered 'expensive' computations in ML?

In many resources/videos I see comments being made along the lines of "and we can see here that we have a logarithm/exponential so this will be an expensive computation to make." (such as ...
82 views

### Validating that a code is a good spherical code

Apologies if this is a trivial question. If that is the case I imagine I would benefit from someone explaining where my understanding is lacking. I am having some trouble interpreting the (putatively ...
98 views

### How frequently scientific code uses comparisons NaN == NaN?

How frequently scientific code uses comparisons NaN == NaN? Reason of asking: from time to time compilers / software floating-point library implementations have ...
131 views

### Floating point and global error in Euler Method

Inspired by this answer, I tried to understand when floating point errors come into visibility and to check it also comparing the plot of the numerical solution with Explicit Euler with the analytical ...
104 views

### How to include negative number in the log-sum-exp?

I want to know summation of some small numbers, such as {e^-1000, -e^1001, e^1002...} If all numbers are positive, I can use log-sum-exp algorithm. But unfortunately, negative numbers are also ...
55 views

### Hardware supporting floats with fraction beyond 64 bit

Is there any computation accelerator (like a GPGPU) available, that natively (this means in hardware, not emulated by a library) supports arithmetics using floating point numbers with a fractional ...
68 views

### What is the reason NVIDIA's Turing has twice the FP16 performance compared to it's FP32 whereas AMD has same performance in FP16 and FP32?

What is the reason NVIDIA's Turing has twice the FP16 performance compared to it's FP32 whereas AMD has same performance in FP16 and FP32? Like GTX 1650 Super has around 8 teraflops in FP16 but half ...
188 views

### Hack for using hardware to take square roots of 128 bit numbers

I need to take integer square roots $\lfloor \sqrt{n}\rfloor$ of (lots of) 128 bit numbers $n$. Calling gmp seems to take surprisingly long (though I can't tell for sure, since gmp routines are not ...
94 views

### How can I detect lost of precision due to rounding in both floating point addition and multiplication?

From Computer Systems: a Programmer's Perspective: With single-precision ﬂoating point the expression (3.14+1e10)-1e10 evaluates to 0.0: the value 3.14 is lost ...
66 views

305 views

### Is there any catch on using zgemm3m vs regular zgemm?

I've just (to my embarrassment) encountered a BLAS-like extension of a matrix-matrix product subroutine gemm in Intel MKL: gemm3m...