Hi Hassan
This is Dear member gile's solution at this post:
http://autolisp-exchange.com/Forums/Forum2/F2T35P1.htmbut I think you can first convert your numbers to strings and then use of (RTOS XXXX 2 2) method
Here dear giles routines :
;;; Rounds a number to the closest value according to precision argument
;;; (round pi 0.01) -> 3.14
;;; (round pi 1e-5) -> 3.14159
;;; (round 5456.50 1.0) -> 5457.0
;;; (round 5456.50 100.0) -> 5500.0
(defun round (num prec)
(if (< 0 prec)
(* prec
(fix (if (minusp num)
(- (/ num prec) 0.5)
(+ (/ num prec) 0.5)
)
)
)
num
)
)