Error getting tags :
error 404Error getting tags :
error 404 round | revDocs | RunRev
Product Edition
Version
round
Basics
Type
Function
Syntax
the round of number round(number,precision)
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Rounds off a number to the nearest integer.
Examples

the round of 26.2 -- yields 26
the round of 2.5 -- yields 3 (rounds up)
round(845.6604,2) -- yields 845.66
round(9734.22,-3) -- yields 10000

Use the round function to round off numbers and eliminate insignificant digits for financial applications.

Parameters:

The number is any number or expression that evaluates to a number.

The precision is an integer giving the decimal place to round off to.

Value:

The round function returns a number.

The round function performs financial-style rounding. If the number is exactly halfway between two numbers, round always rounds the number up if positive, down if negative. (To round off numbers without introducing any statistical upward bias, use the statRound function instead.)

A positive precision indicates a place to the right of the decimal point, and a negative precision indicates a place to the left. For example,` 1 `rounds off to the nearest tenth,` 2 `rounds off to the nearest hundredth,` -1 `rounds off by ten, and so on. If you don't specify a precision, zero is used, meaning that the number is rounded off to a whole number.

` Note: The statRoundfunction is equivalent to HyperTalk's "round" function.`

``` ```
``` ```
``` Lessons User Comments Your Comment Click here to log in and post a comment ```
``` ```
``` ```
``` Store LiveCode LiveCode Features Mobile Embedded LiveCode Desktop Server Developer Program Solutions SMEs Education Microsite Enterprise Game Academy Microsite Showcase Showcase Case Studies Get Started Developers Lessons & Tutorials Documentation Community Resources Developer Conference Newsletters Company About Us Company News Blog Management Team Consultants Careers Press Room Contact us Policies EULA Privacy Policy Environmental Policy Blog Copyright RunRev Ltd 2009 All rights reserved. ```
``` ```
``` ```
``` ```
``` ```
``` ```