optimization and underflow handling