Implement writeDoubleCS