statRound | ||||||||||
Type | function | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Rounds off a number. | |||||||||
Introduced | 1.0 | |||||||||
OS | mac, windows, linux, ios, android | |||||||||
Platforms | desktop, server, mobile | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Keyword: integer Function: average, round Glossary: negative, HyperCard, return, decimal point Control Structure: function | |||||||||
Description | Use the statRound function to round off numbers and eliminate insignificant digits for statistical applications. 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.
| |||||||||
Tags | math |