Difference between revisions of "Manuals/calci/EVEN"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
EVEN(51) ''returns 52'' | EVEN(51) ''returns 52'' | ||
− | *For a non-numeric <math>number</math>, Calci returns an # | + | *For a non-numeric <math>number</math>, Calci returns an #NULL error message. |
+ | *The <math>number</math> is rounded up away from zero to its nearest even integer, irrespective of its sign. | ||
+ | *EVEN() can be used with array of numbers as - | ||
+ | In ZOS: | ||
+ | *EVEN(1..10) or | ||
+ | *1..10@EVEN | ||
+ | In Calci: | ||
+ | *=EVEN(1..10) or | ||
+ | *=1..10@EVEN | ||
− | + | {| class="wikitable" | |
+ | |- | ||
+ | ! Numbers !! EVEN | ||
+ | |- | ||
+ | | 1 || 2 | ||
+ | |- | ||
+ | | 2 || 2 | ||
+ | |- | ||
+ | | 3 || 4 | ||
+ | |- | ||
+ | | 4 || 4 | ||
+ | |- | ||
+ | | 5 || 6 | ||
+ | |- | ||
+ | | 6 || 6 | ||
+ | |- | ||
+ | | 7 || 8 | ||
+ | |- | ||
+ | | 8 || 8 | ||
+ | |- | ||
+ | | 9 || 10 | ||
+ | |- | ||
+ | | 10 || 10 | ||
+ | |} | ||
== Examples == | == Examples == |
Revision as of 06:37, 14 December 2013
EVEN(number)
- where is the input number.
EVEN() rounds the number to the nearest even integer away from zero.
Description
EVEN(number)
EVEN(51) returns 52
- For a non-numeric , Calci returns an #NULL error message.
- The is rounded up away from zero to its nearest even integer, irrespective of its sign.
- EVEN() can be used with array of numbers as -
In ZOS:
- EVEN(1..10) or
- 1..10@EVEN
In Calci:
- =EVEN(1..10) or
- =1..10@EVEN
Numbers | EVEN |
---|---|
1 | 2 |
2 | 2 |
3 | 4 |
4 | 4 |
5 | 6 |
6 | 6 |
7 | 8 |
8 | 8 |
9 | 10 |
10 | 10 |