FANDOM



:iPart(value)

iPart( shows the integer part of a number. It will return the same as floor( for a positive number, and ceiling( for a negative number.

fPart( returns the fractional part of a number; the part iPart( does not return. iPart(A)+fPart(A) will result in the original number.

LocationEdit

  • Math
  • NUM
  • 3:iPart(

ExampleEdit

:Input "NUMBER? ",X
:If X=iPart(X)
:Then
:Disp "INTEGER"
:Else
:Disp "NOT INTEGER"
:End

This program will input a number, then determine whether it is a whole number or a decimal.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.