(Reuters) - Hewlett-Packard Co said on Tuesday it took an $8.8 billion charge related to its acquisition of software firm Autonomy, citing "serious accounting improprieties," as it swung to a fourth-quarter loss.