Chapter Contents |
Previous |
Next |
Language Reference |
where matrix is a numeric matrix or literal.
The INT function truncates the decimal portion of the value of the argument. The integer portion of the value of the argument remains. The INT function takes the integer value of each element of the argument matrix.
An example using the INT function follows:
c=2.8; b=int(c); B 1 row 1 col (numeric) 2In the next example, notice that a value of 11 is returned. This is because of the maximal machine precision. If the difference is less than 1E-12, the INT function rounds up.
x={12.95 10.9999999999999, -30.5 1e-6}; b=int(x); B 2 rows 2 cols (numeric) 12 11 -30 0
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.