FLOORZ Function


FLOORZ Function

Returns the largest integer that is less than or equal to the argument, using zero fuzzing

Category: Truncation

Syntax

FLOORZ ( argument )

Arguments

argument

  • is a numeric constant, variable, or expression.

Comparisons

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

Examples

The following SAS statements produce these results.

SAS Statements

Results

   var1=2.1;   a=floorz(var1);   put a;   
   2   
   var2=-2.4;   b=floorz(var2);   put b;   
   -3   
   c=floorz(-1.6);   put c;   
   -2   
   var6=(1.-1.e-13);   d=floorz(1-1.e-13);   put d;   
     
   e=floorz(763);   put e;   
   763   
   f=floorz(-223.456);   put f;   
   -224   

See Also

Functions:

  • 'FLOOR Function' on page 544




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net