Top "Rounding-error" questions

rounding errors are when the number that is stored is not exactly the number expected

Rounding Standards - Financial Calculations

I am curious about the existence of any "rounding" standards" when it comes to the calculation of financial data. My …

rounding financial rounding-error bankers-rounding
What class to use for money representation?

What class should I use for representation of money to avoid most rounding errors? Should I use Decimal, or a …

python currency rounding-error arbitrary-precision precision
C# Rounding MidpointRounding.ToEven vs MidpointRounding.AwayFromZero

In C# Is there any difference in the accuracy of the two decimal rounding strategies MidpointRounding.ToEven and MidpointRounding.AwayFromZero? …

c# rounding-error
Preventing R From Rounding

How do I prevent R from rounding? For example, > a<-893893084082902 > a [1] 8.93893e+14 I am losing a …

r rounding-error
PHP rounding error

I'm using PHP 5.2.13 on my linux server. I'm getting weird error when rounding numbers. This is my test case: <?…

php rounding rounding-error
.NET rounding error in ToString("f2")

Hello I have this code in C#: float n = 2.99499989f; MessageBox.Show("n = " + n.ToString("f2", CultureInfo.InvariantCulture)); And this …

c# c++ rounding-error
Unable to insert decimal to sql server table through c# code

I'm not able to insert decimal values into Sql Server table. What i'm trying to do is self explanatory through …

c# decimal rounding-error
php intval() and floor() return value that is too low?

Because the float data type in PHP is inaccurate, and a FLOAT in MySQL takes up more space than an …

php floating-accuracy rounding-error
Math.round() not working properly

This is my program. very simply put, it is supposed to round an entered number to a given amount of …

java android rounding rounding-error
Specifying DPI of a GDI Device Context

I have an application that generates metafiles (EMFs). It uses the reference device (aka the screen) to render these metafiles, …

gdi rounding-error metafile