[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Rounding SQC
I have this procedure you may want to try:
You need to send in the number that you want to round off
and the amount you want to round by (in your case .01)
! *********************
! *ROUND-OFF PROCEDURE*
! *********************
BEGIN-PROCEDURE ROUND-OFF(:#allocated, #to_nearest)
LET #remainder = #allocated % #to_nearest
IF (#remainder < (0.5 * #to_nearest) )
LET #allocated = #allocated - #remainder
ELSE
LET #allocated = #allocated + (#to_nearest - #remainder)
END-IF
END-PROCEDURE
------------------
Aaron Solomon
Programmer/Analyst
Goldman Sachs
(212)902-9094
------------------
--
----------------------------------------------------------------
##### ##### ##### ####### # # Aaron Solomon
# # # # # # # # ## ## (212)902-2222
# # # # # # # # #
# #### ##### # # # # # # 1 New York Plaza
# # # ### # # # # # 44th Floor
# # # # ### # # # # # # New York, NY
##### ##### ### ##### ####### # # 10004
----------------------------------------------------------------
- References:
- Rounding SQC
- From: "William B. Sutherland" <wsuth@EARTHLINK.NET>