porting double to float