Top "Floating-point-precision" questions

For questions related to numerical precision in programming.

Correct use of std::cout.precision() - not printing trailing zeros

I see many questions about the precision number for floating point numbers but specifically I want to know why this …

c++ floating-point-precision
Can I specify a numpy dtype when generating random values?

I'm creating a numpy array of random values and adding them to an existing array containing 32-bit floats. I'd like …

python numpy random floating-point-precision
epsilon for various float values

There is FLT_MIN constant that is nearest to zero. How to get nearest to some number value? As an …

c floating-point-precision epsilon
Lodash rounding precision

I'm trying to display a number as a percent by using _.round and then by multiplying the number by 100. For …

javascript rounding percentage lodash floating-point-precision
Handle decimal numbers in mysqli

I have to put the price of some items inside a mysql table. When creating the table I'm using DECIMAL(10,2) …

php floating-point mysqli floating-accuracy floating-point-precision
C# float precision

Can anyone please explain to me what's happening here: using System; using System.Text; namespace ConsoleApplication1 { class Program { static void …

c# .net floating-point floating-point-precision floating-point-conversion
What would the smallest positive value of an IEEE 24-bit float be?

The smallest positive value of an IEEE-754 32-bit float is 2^−149 and that of a 16-bit float is 2^-14. If the …

floating-point ieee-754 floating-point-precision 24-bit