Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 21.02 for BMC Helix Operations Management.

int()


Return the largest integer that is not greater than the argument.

Syntax

int(number)

Parameter

Parameter

Definition

number

numeric value or numeric variable

Description

The int() function returns the largest integer that is not greater than number. It is equivalent to the C library floor(3)function.

Example

The following statements use the int() function to return only the integer portion of a real number. (Each statement returns the integer 3.)

print(int(3.14) . "\n");
print(int(3.48) . "\n");
print(int(3.52) . "\n");
print(int(3.75) . "\n");
print(int(3.99) . "\n");

Note

If the input number's significand(or mantissa) consists of more than 16 digits, there will be a loss of precision and the output would be incorrect. This is as per IEEE standards : IEEE 754: floating point in modern computers.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*