Use typedef to switch between double and single precision