Difference between revisions of "Manuals/calci/INT"
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
3. INT() can be used with multiple inputs as - | 3. INT() can be used with multiple inputs as - | ||
− | INT(4.5,6.7,3.345,2) | + | a) INT(4.5,6.7,3.345,2) ''displays 4,6,3,2 as a result''. |
4. INT() can be combined with other functions as - | 4. INT() can be combined with other functions as - | ||
− | INT(SIN(45) + SIN(45)) ''returns 1 as a result''. | + | a) INT(SIN(45) + SIN(45)) ''returns 1 as a result''. |
− | 1..5|INT((x^2)+2.5)| calculates the integer output for the equation where x varies from 1 to 5. ''Returns 3,6,11,18,27 as a result''. | + | b) 1..5|INT((x^2)+2.5)| calculates the integer output for the equation where x varies from 1 to 5. ''Returns 3,6,11,18,27 as a result''. |
*If the input is non-numeric, Calci displays a #NaN error message. | *If the input is non-numeric, Calci displays a #NaN error message. |
Revision as of 06:58, 27 November 2013
INT(number)
- Where 'number' is a number to round.
INT() rounds a number down to the nearest integer.
Description
INT(number)
INT() function rounds a number to the nearest integer towards zero.
For Example,
1. INT(3.6) returns 3 as output.
2. INT(-2.4) returns -3 as output.
3. INT() can be used with multiple inputs as -
a) INT(4.5,6.7,3.345,2) displays 4,6,3,2 as a result.
4. INT() can be combined with other functions as -
a) INT(SIN(45) + SIN(45)) returns 1 as a result.
b) 1..5|INT((x^2)+2.5)| calculates the integer output for the equation where x varies from 1 to 5. Returns 3,6,11,18,27 as a result.
- If the input is non-numeric, Calci displays a #NaN error message.
- 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