Top "Rounding" questions

Rounding a numerical value means replacing it by another value that is approximately equal but has a shorter, simpler, or more explicit representation.

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
How to ceil, floor and round bcmath numbers?

I need to mimic the exact functionality of the ceil(), floor() and round() functions on bcmath numbers, I've already found …

php rounding floor bcmath ceil
getting Ceil() of Decimal in python?

Is there a way to get the ceil of a high precision Decimal in python? >>> import decimal; &…

python decimal rounding ceil
SQL Server - Round TIME values to the next minute

I've found many posts about rounding "down" time values (e.g. https://stackoverflow.com/a/6667041/468823), but I have another problem: …

sql sql-server-2008 tsql rounding sqldatetime
Prevent Rounding to Zero in Python

I have a program meant to approximate pi using the Chudnovsky Algorithm, but a term in my equation that is …

python math rounding pi
How to round off parseFloat results in Jquery/Javascript?

How would I round off a value from a textfield with a parseFloat result in it? This application basically sums …

javascript jquery rounding parseint parsefloat
How to round off decimal number to 2 digits in iphone?

How can we round off decimal numbers to 2 digits in iphone ? For example , 5345 --> 53 570 -- > 57 89523 -- > 90 I …

iphone rounding nsformatter
How to round floats to integers while preserving their sum?

Let's say I have an array of floating point numbers, in sorted (let's say ascending) order, whose sum is known …

algorithm language-agnostic rounding
using jquery, how would i find the closest match in an array, to a specified number

using jquery, how would i find the closest match in an array, to a specified number For example, you've got …

jquery arrays math rounding closest
Python PIL - Finding Nearest Color (Rounding Colors)

There is a game called Roblox, in which the player makes the game, usually of lego-looking bricks. In Roblox, for …

python colors python-imaging-library rounding roblox