Difference between revisions of "Manuals/calci/INT"
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=...") |
|||
| Line 1: | Line 1: | ||
| − | + | =INT(number)= | |
| − | + | *Where number is a number to be rounded. | |
| − | + | INT() rounds a number down to the nearest integer. | |
| − | |||
| − | |||
| − | + | == Description == | |
| − | + | INT(number) | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | INT(3.6) is 3 | |
| − | + | *TRUNC() and INT() functions are somewhat similar. TRUNC() removes the fractional part of the number, where as INT() rounds the number down to nearest integer. | |
| − | + | *INT() and TRUNC() work differently with negative numbers. | |
| − | |||
| − | |||
| − | |||
| − | '' | + | INT(-45.1) ''returns -45'' whereas |
| + | |||
| + | TRUNC(-45.1) ''returns -46'' | ||
| − | + | *If the input is non-numeric, Calci displays an error message. | |
| − | + | == 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" |INT(1000.34) | |
| − | | class="sshl_f" | | + | | class="sshl_f" |1000 |
| − | + | ||
| − | | class="sshl_f" | | ||
| − | |||
|- class="even" | |- class="even" | ||
| − | + | | class="sshl_f" |INT(23.4546) | |
| − | + | | class="sshl_f" |23 | |
| − | | class="sshl_f | + | |
| − | |||
| − | | class="sshl_f" | | ||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | + | | class="sshl_f" |INT(-3.25) | |
| − | | class="sshl_f" | | + | | class="sshl_f" |-4 |
| − | | class="sshl_f" | + | |
| − | |||
| − | |||
| − | |- | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | + | | class="sshl_f" |INT(-0.222) | |
| − | + | | class="sshl_f" |-1 | |
| − | |||
| − | | class="sshl_f" | | ||
| − | | class="sshl_f" | ||
| − | |- | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|} | |} | ||
| − | + | == See Also == | |
| − | + | ||
| − | + | *[[Manuals/calci/TRUNC| TRUNC]] | |
| + | |||
| + | *[[Manuals/calci/ROUND | ROUND]] | ||
| + | |||
| + | *[[Manuals/calci/ROUNDUP | ROUNDUP]] | ||
| + | |||
| + | *[[Manuals/calci/ROUNDDOWN | ROUNDDOWN]] | ||
| + | |||
| + | *[[Manuals/calci/CEILING | CEILING]] | ||
| + | |||
| + | *[[Manuals/calci/FLOOR | FLOOR]] | ||
| + | |||
| + | ==References== | ||
| + | |||
| + | *[http://en.wikipedia.org/wiki/Truncation TRUNC Function] | ||
Revision as of 21:50, 26 November 2013
INT(number)
- Where number is a number to be rounded.
INT() rounds a number down to the nearest integer.
Description
INT(number)
INT(3.6) is 3
- TRUNC() and INT() functions are somewhat similar. TRUNC() removes the fractional part of the number, where as INT() rounds the number down to nearest integer.
- INT() and TRUNC() work differently with negative numbers.
INT(-45.1) returns -45 whereas
TRUNC(-45.1) returns -46
- If the input is non-numeric, Calci displays an error message.