# Help needed with math.round function

**URL:** <https://forum.kirupa.com/t/help-needed-with-math-round-function/163115>\
**Category:** Uncategorized\
**Created:** [September 19, 2005, 10:57pm UTC](https://forum.kirupa.com/t/help-needed-with-math-round-function/163115 "2005-09-19T22:57:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmw](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@bmw](https://forum.kirupa.com/u/bmw)\
**Post date:** [September 19, 2005, 10:57pm UTC](https://forum.kirupa.com/t/help-needed-with-math-round-function/163115/1 "2005-09-19T22:57:25Z")

</div>

Hi,

I have this piece of code :

[font=Times New Roman][size=3]var c4 = Math.sqrt ((c3\*(1-c3)/(num1+num2))+(c3\*(1-c3)/(num3+num4)));[/size][/font]  
When I run my program I get values upto several decimals. How do I use the Math.round to the above piece of code to truncate to say 4 decimal places.

Please suggest.

Thanks.
