Top "Floating-point" questions

Floating point numbers are approximations of real numbers that can represent larger ranges than integers but use the same amount of memory, at the cost of lower precision.

Floating point vs integer calculations on modern hardware

I am doing some performance critical work in C++, and we are currently using integer calculations for problems that are …

c++ x86 floating-point x86-64
Add floating point value to android resources/values

I'm trying to add a little space between lines to my TextViews using android:lineSpacingMultiplier from the documentation: Extra spacing …

android resources floating-point
Python: Find index of minimum item in list of floats

How can I find the index of the minimum item in a Python list of floats? If they were integers, …

python list floating-point minimum floating-point-precision
Convert String to Integer/Float in Haskell?

data GroceryItem = CartItem ItemName Price Quantity | StockItem ItemName Price Quantity makeGroceryItem :: String -> Float -> Int -> …

haskell floating-point int
Compare floats in php

I want to compare two floats in PHP, like in this sample code: $a = 0.17; $b = 1 - 0.83; //0.17 if($a == $b ){ echo …

php floating-point
Double to string conversion without scientific notation

How to convert a double into a floating-point string representation without scientific notation in the .NET Framework? "Small" samples (effective …

c# .net floating-point number-formatting
1e-9 or -1e9, which one is correct?

I am assigned some old code and when I was reading through it, I noticed it had these in the …

c++ math floating-point notation exponential
How do I round a number in JavaScript?

While working on a project, I came across a JS-script created by a former employee that basically creates a report …

javascript floating-point numbers rounding
Why is Double.MIN_VALUE in not negative

Can anyone shed some light on why Double.MIN_VALUE is not actually the minimum value that Doubles can take? …

java numbers floating-point
Should I use double or float?

What are the advantages and disadvantages of using one instead of the other in C++?

c++ types floating-point double-precision