FUNCTION RoundOff! (X!, K%) STATIC IF K% > 6 THEN K% = 6 IF ABS(X!) > 1E-39 THEN NP% = K% - 1 - INT(LOG(ABS(X!)) / LOG(10#)) PN# = 10# ^ CDBL(NP%) L& = PN# * X! RoundOff! = L& / PN# ELSE RoundOff! = 0 END IF END FUNCTION