Difference between revisions of "Manuals/calci/INT"

From ZCubes Wiki
Jump to navigation Jump to search
Line 1: Line 1:
=INT(number)=
+
<div style="font-size:30px">'''INT(n), where n is the  real number'''</div><br/>
 
+
*<math>n</math> is the real number  
*Where 'number' is a number to round.
 
 
 
INT() rounds a number down to the nearest integer.
 
  
 
== Description ==
 
== Description ==
  
INT(number)
+
*This function gives number without any decimal part.
 
+
*The function INT(n) is rounding the given number to down to the nearest number.
INT() function rounds a number to the nearest integer towards zero.
+
*Integer is the number without any decimal or fractional part but it can be the natural number with positive or negative sign. i.e.,INTEGER={….-3,-2,-1,0,1,2,3...}
 
+
*So integers are countably infinite set.
For Example,
+
*In INT(n), where <math> n </math> is the real number.Also <math> n </math> any operations with the real numbers.
 
+
*For e.g.,INT(2.3*4.7)
1. INT(3.6) ''returns 3'' as output.
+
*This function will give result as error when n is nonnumeric.
 
 
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''
 
 
 
== Examples ==
 
 
 
<div id="6SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
| class="  " | '''Function'''
 
| class="  " | '''Output'''
 
 
 
|- class="odd"
 
| class="sshl_f" |INT(1000.34)
 
| class="sshl_f" |1000
 
 
 
|- class="even"
 
| class="sshl_f" |INT(23.4546)
 
| class="sshl_f" |23
 
 
 
|- class="odd"
 
| class="sshl_f" |INT(-3.25)
 
| class="sshl_f" |-4
 
  
|- class="even"
+
==Examples==
| class="sshl_f" |INT(-0.222)
+
#INT(10.99)=10
| class="sshl_f" |-1
+
#INT(-10.99)=-11
|}
+
#INT(0.05)=0,INT(-0.05)=-1
 +
#INT(4.56+7.21)=11
 +
#INT(10.78-9.45)=1
 +
#INT(12.76*12.76)=162
 +
#INT(49.54/20.4)=2
 +
#20.76-INT(19.45)=1.76
  
 
== See Also ==
 
== See Also ==

Revision as of 23:12, 18 December 2013

INT(n), where n is the real number


  • is the real number

Description

  • This function gives number without any decimal part.
  • The function INT(n) is rounding the given number to down to the nearest number.
  • Integer is the number without any decimal or fractional part but it can be the natural number with positive or negative sign. i.e.,INTEGER={….-3,-2,-1,0,1,2,3...}
  • So integers are countably infinite set.
  • In INT(n), where is the real number.Also any operations with the real numbers.
  • For e.g.,INT(2.3*4.7)
  • This function will give result as error when n is nonnumeric.

Examples

  1. INT(10.99)=10
  2. INT(-10.99)=-11
  3. INT(0.05)=0,INT(-0.05)=-1
  4. INT(4.56+7.21)=11
  5. INT(10.78-9.45)=1
  6. INT(12.76*12.76)=162
  7. INT(49.54/20.4)=2
  8. 20.76-INT(19.45)=1.76

See Also

References