I want to round the actual value of a variable to a certain precision point.
Example:
.3333333333333
to
.3333300000000
(rounding to .00001)
Is this possible?
|
I want to round the actual value of a variable to a certain precision point. Example: .3333333333333 to .3333300000000 (rounding to .00001) Is this possible? |
|||||||||||||||
|
Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
$$ \left[ 10^5 x \right] / 10^5 $$ The idea is that $10^5$ times the rounded value of $x$ is an integer, so we simply shift the problem over so that we can ask for the nearest integer, then shift back. |
|||||||||||||
|