fix pow() error on device