INT

Synopsis
INT num
Description

Outputs its input with fractional part removed. That is, INT outputs an integer with the same sign as the input, whose absolute value is the largest integer less than or equal to the absolute value of the input.

Inside the computer, numbers are represented with two different formats, one for integers and one for numbers with fractional parts. On most computers the largest number that can be represented in integer format is smaller than the largest integer that can be represented in fractional format. The INT operation always outputs a number whose value is mathematically an integer, but if its input is very large the output may not be in integer format. In that case, operations like REMAINDER that require an integer input will not accept this number.

Example
SHOW INT 8.2
8
SHOW INT 8.7
8

SourceForge.net Logo