Top "Precision" questions

For questions related to numerical precision in programming.

In which order should floats be added to get the most precise result?

This was a question I was asked at my recent interview and I want to know (I don't actually remember …

c++ floating-point precision
Dealing with very small numbers in R

I need to calculate a list of very small numbers such as (0.1)^1000, 0.2^(1200), and then normalize them so they will sum …

r precision underflow
Why does adding 0.1 multiple times remain lossless?

I know the 0.1 decimal number cannot be represented exactly with a finite binary number (explanation), so double n = 0.1 will lose …

java floating-point double precision
How best to sum up lots of floating point numbers?

Imagine you have a large array of floating point numbers, of all kinds of sizes. What is the most correct …

algorithm language-agnostic floating-point precision
Is floating-point math consistent in C#? Can it be?

No, this is not another "Why is (1/3.0)*3 != 1" question. I've been reading about floating-points a lot lately; specifically, how the same …

c# .net floating-point precision ieee-754
How to use Gcc 4.6.0 libquadmath and __float128 on x86 and x86_64

I have medium size C99 program which uses long double type (80bit) for floating-point computation. I want to improve precision …

gcc floating-point precision 128-bit
generating pi to nth digit java

I wanted to know how I can generate pi to the nth digit. I have a couple of basic ideas. …

java precision bigdecimal pi
JS- toFixed returns a string, but I need a number to 6 digits

I am working with another codebase that I have no control over, and that I cannot see. I can send …

javascript decimal precision tofixed
Auto-Interval precision in MS Chart

I'm currently using the charting within .NET using System.Windows.Forms.DataVisualization.Charting.Chart. Thus far it seems very powerful, …

c# precision data-visualization mschart intervals
Convert a number from stringstream to string with a set precision

I would like to obtain a number from stringstream and set it to 5 significant figures. How do I do this? …

c++ precision significant-digits