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

the statRound of 2.5 -- yields 2, because 2 is even (rounds down)
the statRound of 3.5 -- yields 4, because 3 is odd (rounds up)
statRound(22.753, 2) -- yields 22.75
statRound(723.2, -1) -- yields 720

Additional Comments

Use the statRound function to round off numbers and eliminate insignificant digits for statistical 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 statRound function returns a number.

Comments:

The statRound function performs statistical rounding. If the number is exactly halfway between two numbers, statRound rounds the number to the nearest even integer. (To round off numbers such numbers upward, as is the convention for financial applications, use the round function instead.) Because of this, a set of numbers rounded with statRound is not skewed upward, the way it is with the round function. Therefore, you should use statRound when statistical accuracy is required.

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. ```
``` ```
``` ```
``` ```
``` ```
``` ```