Difference between revisions of "Manuals/calci/ODD"
Jump to navigation
Jump to search
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | = ODD( | + | <div style="font-size:30px">'''ODD(Number)'''</div><br/> |
− | *where <math> | + | *where <math>Number</math> is the input number. |
− | ODD() rounds | + | **ODD(), rounds a number up to the nearest odd integer. |
== Description == | == Description == | ||
− | ODD( | + | ODD(Number) |
ODD(76) ''returns 77'' | ODD(76) ''returns 77'' | ||
− | *For a non-numeric <math> | + | *For a non-numeric <math>Number</math>, Calci returns an #NULL error message. |
− | *The <math> | + | *The <math>Number</math> is rounded up away from zero to its nearest odd integer, irrespective of its sign. |
*ODD() can be used with array of numbers as - | *ODD() can be used with array of numbers as - | ||
In ZOS: | In ZOS: | ||
Line 95: | Line 95: | ||
*[http://en.wikipedia.org/wiki/Even_and_odd_functions ODD Function] | *[http://en.wikipedia.org/wiki/Even_and_odd_functions ODD Function] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | *[[Z_API_Functions | List of Main Z Functions]] | ||
+ | |||
+ | *[[ Z3 | Z3 home ]] |
Latest revision as of 15:07, 21 August 2018
ODD(Number)
- where is the input number.
- ODD(), rounds a number up to the nearest odd integer.
Description
ODD(Number)
ODD(76) returns 77
- For a non-numeric , Calci returns an #NULL error message.
- The is rounded up away from zero to its nearest odd integer, irrespective of its sign.
- ODD() can be used with array of numbers as -
In ZOS:
- ODD(1..10) or
- 1..10@ODD
In Calci:
- =ODD(1..10) or
- =1..10@ODD
Numbers | ODD |
---|---|
1 | 1 |
2 | 3 |
3 | 3 |
4 | 5 |
5 | 5 |
6 | 7 |
7 | 7 |
8 | 9 |
9 | 9 |
10 | 11 |
Examples
Function | Output |
ODD(98) | 99 |
ODD(-23) | -23 |
ODD(34.98989898) | 35 |
ODD(-5.2) | -7 |
ODD(666) | 667 |
Related Videos
See Also
References