more robust handling of 0 as computation result