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.

How to remove milliseconds from LocalTime in java 8

Using the java.time framework, I want to print time in format hh:mm:ss, but LocalTime.now() gives the …

java rounding datetime-format java-time localtime
round in Smarty shows wrong result

In my Smarty 3 template I have this code: {$a=8.34} {$b=8.33} {$a-$b|round:2} Expected result is: 0.01 But I receive this: 0.0099999999999998 …

smarty rounding
Why do round() and ceil() not return an integer?

Once in a while, I find myself rounding some numbers, and I always have to cast the result to an …

c++ c casting rounding
Round money to nearest 10 dollars in Javascript

How can I round a decimal number in Javascript to the nearest 10? My math is pretty rubbish today, it could …

javascript decimal rounding currency
CInt does not round Double value consistently - how can I remove the fractional part?

I've stumbled upon an issue with CInt and converting a double to an integer. The issue is the following: CInt(10.5) …

.net vb.net c#-to-vb.net rounding
Prevent Matlab from rounding output?

Im running a simple script to estimate roots for a function. Everything works great, each iteration of the algorithm prints …

matlab rounding number-formatting newtons-method
Round to n Significant Figures in SQL

I would like to be able to round a number to n significant figures in SQL. So: 123.456 rounded to 2sf …

sql sql-server tsql rounding significant-digits
MySql FLOAT datatype and problems with more then 7 digit scale

We are using MySql 5.0 on Ubuntu 9.04. The full version is: 5.0.75-0ubuntu10 I created a test database. and a test …

mysql rounding mysql-5.0
Is there a way to round numbers into a reader friendly format? (e.g. $1.1k)

Much like the Stackoverlow reputation rounding, I'm hoping to do the same thing with currency $1,000 => 1k $1,000,000 => 1m How …

javascript jquery rounding currency
trunc and round function in sql

Is trunc and round the same with negative arguments? SQL> select round(123456.76,-4) from dual; ROUND(123456.76,-4) ------------------- 120000 SQL&…

sql oracle truncate rounding negative-number