Module talk:Math/testcases
All tests passed.
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|average|5|6|7}} | 6 | 6 | |
{{#Invoke:math|average|-7}} | -7 | -7 | |
{{#Invoke:math|average|10000000001|10000000002|10000000003}} | 10000000002 | 10000000002 |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|max|}} | |||
{{#Invoke:math|max|5|6|9}} | 9 | 9 | |
{{#Invoke:math|max|-5|-6|-9}} | -5 | -5 |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|min|}} | |||
{{#Invoke:math|min|1|2|3}} | 1 | 1 | |
{{#Invoke:math|min|-1|-2|-3}} | -3 | -3 |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|order|2}} | 0 | 0 | |
{{#Invoke:math|order|20}} | 1 | 1 | |
{{#Invoke:math|order|200}} | 2 | 2 | |
{{#Invoke:math|order|x = 5}} | 0 | 0 | |
{{#Invoke:math|order|string}} | Formatting error: Order of magnitude input appears non-numeric | Formatting error: Order of magnitude input appears non-numeric |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|precision|1.9856}} | 4 | 4 | |
{{#Invoke:math|precision|1.1}} | 1 | 1 | |
{{#Invoke:math|precision|1.9999999999}} | 10 | 10 | |
{{#Invoke:math|precision|x = 1.9888}} | 4 | 4 | |
{{#Invoke:math|precision|letra}} | Formatting error: Precision input appears non-numeric | Formatting error: Precision input appears non-numeric |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|precision_format|10|2}} | 10.00 | 10.00 |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|random}} | 0.00047147460303804 | 0.22198432740848 | |
{{#Invoke:math|random|10}} | 8 | 6 | |
{{#Invoke:math|random|1|2}} | 2 | 1 |
Text | Expected | Actual | |
---|---|---|---|
{{#Invoke:math|round|1.99999}} | 2 | 2 | |
{{#Invoke:math|round|1.99999|0}} | 2 | 2 | |
{{#Invoke:math|round|1.94|1}} | 1.9 | 1.9 | |
{{#Invoke:math|round|15|-1}} | 20 | 20 | |
{{#Invoke:math|round|value = 2.99999|precision = 2}} | 3 | 3 |
Start a discussion about Module:Math/testcases
Talk pages are where people discuss how to make content on Wikimedia Commons the best that it can be. You can use this page to start a discussion with others about how to improve Module:Math/testcases.