FOR i = 1 TO 3 step .1 debugout PaulRound(i, 15) debugout round( val( transform(i)), 15) ENDFOR FUNCTION PaulRound( tnNumber, tnDecimals) RETURN round(val(alltrim(str(tnNumber,20,tnDecimals+1))),tndecimals)At 1.6 both start returning 1.600000000000001, 1.700000000000001, etc. At 2.7 the error moves to 2.700000000000002, 2.800000000000002, etc. Moreover, TRANSFORM itself is not the problem, since using
round( val( alltrim( str( i, 17, 15))), 15)instead of TRANSFORM gives the same error.