I know there is a brainiac out there who knows the answer.  It eludes
me...

I get numbers, such as 2.209; 2.170, etc...

I need to round them to the next number which, after subtracting 1.40 is
evenly divisible by 5, i.e. 2.209 would round to 2.25 (vrate should be
.17).  2.170 correctly rounds to 2.20 (vrate is .16). 

This is what I have so far, but as you can see, it doesn't work
reliably:

SET VAR VBASE = 1.40
SET VAR VRESPONSE = 2.209
SET VAR vmod = (MOD(.vresponse,.05))
IF vmod > 0 THEN
   SET VAR vresponse = (ROUND(.vresponse,1))
ENDIF
SET VAR vrate = ((.vresponse - .vbase)/5)
Show var vrate yields .16 should be .17

With vresponse = 2.170, vrate is correctly .16

TIA,

Claudine :)

Reply via email to