Difference between revisions of "Manuals/calci/ODD"
Jump to navigation
Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="2SpaceContent" align="left"><div class="ZEditBox" align=...") |
|||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <div | + | <div style="font-size:30px">'''ODD(Number)'''</div><br/> |
− | + | *where <math>Number</math> 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 <math>Number</math>, Calci returns an #NULL error message. | |
− | |||
− | |||
− | |||
− | |||
− | < | + | *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 - | ||
+ | In ZOS: | ||
+ | *ODD(1..10) or | ||
+ | *1..10@ODD | ||
+ | In Calci: | ||
+ | *=ODD(1..10) or | ||
+ | *=1..10@ODD | ||
− | + | {| class="wikitable" | |
− | + | |- | |
− | + | ! Numbers !! ODD | |
− | - | + | |- |
− | + | | 1 || 1 | |
− | + | |- | |
− | + | | 2 || 3 | |
− | + | |- | |
− | + | | 3 || 3 | |
− | + | |- | |
− | + | | 4 || 5 | |
− | - | + | |- |
− | + | | 5 || 5 | |
− | + | |- | |
− | + | | 6 || 7 | |
− | + | |- | |
− | + | | 7 || 7 | |
− | + | |- | |
− | + | | 8 || 9 | |
− | + | |- | |
− | + | | 9 || 9 | |
+ | |- | ||
+ | | 10 || 11 | ||
+ | |} | ||
− | + | == Examples == | |
− | |||
− | |||
− | |||
<div id="6SpaceContent" class="zcontent" align="left"> | <div id="6SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | + | | class=" " | '''Function''' | |
− | + | | class=" " | '''Output''' | |
− | + | ||
− | | class=" " | | ||
− | | class=" " | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" |ODD(98) | |
− | + | | class="sshl_f" |99 | |
− | | class="sshl_f" | | + | |
− | | class="sshl_f" | | ||
− | |||
|- class="even" | |- class="even" | ||
− | + | | class="sshl_f" |ODD(-23) | |
− | | class="sshl_f" | | + | | class="sshl_f" |-23 |
− | | class="sshl_f | + | |
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" |ODD(34.98989898) | |
− | | class="sshl_f" | | + | | class="sshl_f" |35 |
− | | class="sshl_f" | | + | |
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | + | | class="sshl_f" |ODD(-5.2) | |
− | | class="sshl_f" | | + | | class="sshl_f" |-7 |
− | | class="sshl_f" | | + | |
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" |ODD(666) | |
− | + | | class="sshl_f" |667 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | class="sshl_f" | | ||
− | | class="sshl_f" | | ||
|} | |} | ||
− | + | ==Related Videos== | |
− | + | ||
− | + | {{#ev:youtube|SFRTTUtAjg4|280|center|ODD}} | |
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/ISODD | ISODD]] | ||
+ | |||
+ | *[[Manuals/calci/EVEN | EVEN]] | ||
+ | |||
+ | *[[Manuals/calci/TRUNC | TRUNC]] | ||
+ | |||
+ | *[[Manuals/calci/INT | INT]] | ||
+ | |||
+ | *[[Manuals/calci/CEILING | CEILING]] | ||
+ | |||
+ | *[[Manuals/calci/FLOOR | FLOOR]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[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