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.

Rounding to a power of 10

I have a variable, tauMax, that I want to round up to the nearest power of ten(1, 10, 100, 1000...). I am using …

matlab rounding logging exponent
Round a POSIX date (POSIXct) with base R functionality

I'm currently playing around a lot with dates and times for a package I'm building. Stumbling across this post reminded …

r date datetime rounding posixct
Set all BigDecimal operations to a certain precision?

My Java program is centered around high precision calculations, which need to be accurate to at least 120 decimal places. Consequentially, …

java math rounding bigdecimal floating-accuracy
Round Specific Corners SwiftUI

I know you can use .cornerRadius() to round all the corners of a swiftUI view but is there a way …

user-interface rounding swiftui cornerradius
"width: calc(100% / 3);" not working properly

I have a 3 column layout that should fill the whole screen so on my columns I am using: width: calc(100% / 3); …

html css width rounding css-calc
ClosedXML: Working with percents, 1 decimal place and rounding?

I am attempting to use C# and ClosedXML to enter data into an excel sheet. I have found most of …

c# rounding decimal closedxml
Why Is ToString() Rounding My Double Value?

How do I prevent my double value from being rounded when converting to a string? I have tried both Convert.…

.net rounding tostring
How to round double values but keep trailing zeros

In C# I want a function that rounds a given double to a given amount of decimals. I always want …

c# math c#-2.0 double rounding
How to perform ceiling-division in integer arithmetic?

It's basically returning the boxes_needed. 1 box can contain 10 items. So if the items typed by the user is 102 then …

python rounding integer-arithmetic
Rounding off floats with ostringstream

I have an issue regarding conversion from float to c++ string using ostringstream. Here is my line: void doSomething(float …

c++ rounding stringstream ostringstream