Difference between revisions of "MC-Basic:ROUND"

From SoftMC-Wiki
Jump to: navigation, search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:ROUND}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 4: Line 5:
  
 
|SYNTAX=
 
|SYNTAX=
Round(''<expression>'')
+
Round(<''expression''>)
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 15: Line 16:
  
 
5.5                   6.0<br>
 
5.5                   6.0<br>
        4.5                   4.0<br>
+
4.5                   4.0<br>
        3.5                   4.0<br>
+
3.5                   4.0<br>
        2.5                   2.0<br>
+
2.5                   2.0<br>
        1.5                   2.0
+
1.5                   2.0
  
 
|TYPE=
 
|TYPE=
Line 24: Line 25:
  
 
|RANGE=
 
|RANGE=
+/- MaxDouble
+
± MaxDouble
  
 
|UNITS=
 
|UNITS=
Line 36: Line 37:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Read-Only
+
Read only
  
 
|EXAMPLE=
 
|EXAMPLE=
Line 44: Line 45:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:INT|INT]]
+
* [[MC-Basic:INT|INT]]
  
[[Category:Axystems:MC-Basic:Arithmetic Functions|ROUND]]
+
[[Category:MC-Basic:Arithmetic Functions|ROUND]]
  
 
}}
 
}}

Latest revision as of 07:24, 27 April 2017

Language: English  • 中文(简体)‎

Rounds the argument to the nearest even whole number so the cumulative error in a random sample is never more than 0.5. For example:

Value          Round to nearest even

5.5                   6.0
4.5                   4.0
3.5                   4.0
2.5                   2.0
1.5                   2.0

Syntax

Round(<expression>)

Availability

All versions

Type

Double

Range

± MaxDouble

Scope

Configuration, Task or Terminal

Limitations

Read only

Examples

?Round(4.5)

Var1 = Round(Var2)

See Also