Previous Page | Next Page

Functions and CALL Routines

INTZ Function



Returns the integer portion of the argument, using zero fuzzing.
Category: Truncation

Syntax
Arguments
Details
Comparisons
Examples
See Also

Syntax

INTZ (argument)


Arguments

argument

is a numeric constant, variable, or expression.


Details

The following rules apply:


Comparisons

Unlike the INT function, the INTZ function uses zero fuzzing. If the argument is within 1E-12 of an integer, the INT function fuzzes the result to be equal to that integer. The INTZ function does not fuzz the result. Therefore, with the INTZ function you might get unexpected results.


Examples

The following SAS statements produce these results.

SAS Statements Results
var1=2.1;
a=intz(var1);
put a;
 

2
var2=-2.4;
b=intz(var2);
put b;
 

-2
var3=1+1.e-11;
c=intz(var3);
put c;
 
1
f=intz(-1.6);
put f;
 
-1


See Also

Functions:

CEIL Function

CEILZ Function

FLOOR Function

FLOORZ Function

INT Function

ROUND Function

ROUNDZ Function

Previous Page | Next Page | Top of Page